Creating a Scheduled Task that runs forever on Windows XP
Posted
by
Mike Fiedler
on Server Fault
See other posts from Server Fault
or by Mike Fiedler
Published on 2011-01-10T16:36:05Z
Indexed on
2011/01/10
16:55 UTC
Read the original article
Hit count: 224
When I create a scheduled task, I do so via command line:
schtasks.exe /Create /TN "startup-script" /TR "C:\startup.bat" /RU taskuser
/RP taskpasswd /SC ONLOGON
The idea is that this task run forever. The batch opens a java process that is never meant to end.
I've used ONLOGON, as the machine auto-logs in as taskuser.
All this works fine, for about 72 hours, after which the Duration flag kicks in and ends the process. Windows XP doesn't have the /DU flag on command line - is there an alternative method to creating a task that is meant to run from a system startup (doesn't even require logon) and runs forever, without touching a GUI?
© Server Fault or respective owner