Scheduled task with indefinite duration from command line


i have scheduled task set on windows 2008 r2 server runs indefinitely every 5 minutes. setting through gui works fine. however, i'm trying mass deployment via command line. can create options want, except "indefinitely" part of task. current command this:

schtasks /create /s systemname /u user /p password /tn "my task" /tr c:\apps\task.bat /sc minute /mo 5 /sd 10/01/2012 /st 01:00:00 /ru user /rp password

this creates task need, duration, default, 1 day. have used several combinations of /sc /ri /mo , /du parameters, , haven't been able come out indefinitely.

anyone know right combination? tia!

maybe you don’t have set start date or start time if want task run indefinitely every 5 minutes. this:


schtasks /create /s systemname /u username /p password /tn "mytask" /tr c:\apps\task.bat /sc minute /mo 5 /ru username /rp password


thanks
zhang



Windows Server  >  Management



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607