1
In Windows Server 2008 R2, I want to set up a Scheduled Task to run a batch script on the following condition
-The task should only run once another task, that also runs a batch script, has
completed. How do I do that?
Note: Both task are set to run once daily.
Thanks!
Cool thank you. I see that you can also use the schtasks command to call a specific task - How do I get the ID or the Process ID of a task? – DextrousDave – 2013-07-03T17:47:40.423
Mmm. Do you mean of the task created by the Scheduled Task? it is a batch program. Tasklist.exe - might get you to it. Also, check wmic.exe. – RobW – 2013-07-03T21:25:10.533
There is another program called getpids.exe http://www.scheibli.com/projects/getpids/ . It will return the current PID, parent pids (one of which is your cmd.exe). Youu would call it from your batch program and parse for Process ID.
– RobW – 2013-07-04T00:26:49.240