Welcome to Lieben Knowledgebase!

local and remote task scheduling

Question/Problem:

How do i schedule tasks on other computers in my network? And locally? I would like to do this with a batch script or by using the commandline


The answer/solution:

In windows xp you can use schtasks.exe for this. It's a small tool that allows you to use the commandline to enter tasks in either your local computer's task schedule, or remotely with whatever credentials you want to use.

for example:

schtasks /create /tn defrag /tr c:\windows\system32\defrag.exe /s anothercomputer /ru username /rp password /sc daily

would create a task on 'anothercomputername', then you could start the task immediately by typing:

schtasks /run /s anothercomputer /tn defrag

when it's done, delete it with:

schtasks /delete /s anothercomputer /tn defrag /f

these commands could of course be entered into a batch script to remotely install a new font to another computer, for an example, go to http://www.whitefog.net/kb/remotely%20install%20a%20new%20font

for a more complete reference with many more examples in using schtasks, visit this link:

http://www.microsoft.com/technet/prodtechnol/windowsserver2003/nl/library/ServerHelp/1d284efa-9d11-46c2-a8ef-87b297c68d17.mspx?mfr=true


added by Jos on: 27-04-2007



keywords: schtasks, remote scheduling, windows xp, batch scripts,


©2009 by Lieben.nu