2
I am trying to schedule a task that runs a command with dynamic arguments.
So for example, instead of the word "Arguments" at the end of the command below, I need to pass the following arguments:
2017-04-16 2017-04-02 3 2017
Next time, though, I need those arguments to be changed to:
2017-04-23 2017-04-09 3 2017
And the next time to:
2017-04-30 2017-04-16 3 2017
How do I do that?
schtasks.exe /create /SC WEEKLY /D TUE /SD 5/23/2017 /ST 03:00:00 /TN "taskname" /TR "'c:\program files(x86)\task.exe' Arguments"
2You may be better off pointing the scheduled task to a Command script and put in it the logic to run the command with the desired arguments. – I say Reinstate Monica – 2017-05-18T19:15:51.237