Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: How to update the additional arguments of an existing task?

$
0
0
Finally I found the solution. The above error message was a little bit confusing :-).

The tasks we would like to modify were not located in the root folder but in subdirectories.

So the following code is finally working:
Using ts As New TaskService("YourRemoteServerName")
   Dim task = ts.GetFolder("YourSubdirectoryName").Tasks("YourTaskName")
   If task IsNot Nothing
      Dim action As ExecAction = task.Definition.Actions("YourID")
      ' Dim action = task.Definition.Actions(0)
      action.Arguments = "new argument string"
      task.RegisterChanges()
   End If
End Using

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>