schtasks

  • Thread starter Thread starter TBoon
  • Start date Start date
T

TBoon

Hi there,

Anyones know how to create an OS Scheduled Task with mutiple schedules using
the command "schtaks" instead of GUI?
 
TBoon said:
Hi there,

Anyones know how to create an OS Scheduled Task with mutiple schedules using
the command "schtaks" instead of GUI?

Type schtasks.exe /? to see how it's done.
Be careful about the spelling - it's not "schtaks".
 
Of course it can - I've done it dozens of times. Let's have
a look at your command!
 
schtasks /create /tn "Gogo" /tr %SystemRoot%\system32\notepad.exe /sc
monthly /mo 3
schtasks /create /tn "Gogo" /tr %SystemRoot%\system32\notepad.exe /sc weekly
/mo 2 /d FRI

Show me your working command.
 
Both commands work fine. What makes you think that they
do not work? What error message do you see?

You should note that scheduled tasks are meant to be run
in the background. Scheduling notepad.exe is not a good idea,
since notepad by its very nature is an interactive program. If
you wish to test schtasks.exe then you should use this command:

schtasks /create /tn "Gogo" /tr %SystemRoot%\test.bat /sc weekly /mo 2 /d
FRI

and place this line into c:\%SystemRoot%\test.bat:

echo %date% %time% %UserName% >> c:\test.log
 
Of course you cannot create two tasks with the same name,
same as you cannot have two children with the same name
in the same family! Call your tasks Gogo1, Gogo2, Gogo3.
 
If you already know this then you should say so. This
avoids me suggesting solutions that you have already
tried.

Have a look in c:\WinNT\Tasks. This is where scheduled
tasks dwell.

Since schtasks.exe is not native to Win2000, you should
check this link to make them work:
http://www.jsifaq.com/SUBK/tip5300/rh5335.htm
 
Back
Top