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
This works best if you have initially registered either a single Action or if you have given your action an Id. I'll show both ways:
Using ts AsNew TaskService("YourRemoteServerName")
   Dim task = ts.RootFolder.Tasks("YourTaskName")
   If task IsNotNothingDim action = task.TaskDefinition.Actions["YourID"];
      ' Dim action = task.TaskDefinition.Actions[0];
      action.Arguments = "new argument string"
      task.RegisterChanges()
   EndIfEndUsing

Viewing all articles
Browse latest Browse all 2206

Trending Articles



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