schtasks

T

TBoon

Hi there,

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

Pegasus \(MVP\)

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".
 
P

Pegasus \(MVP\)

Of course it can - I've done it dozens of times. Let's have
a look at your command!
 
T

TBoon

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.
 
P

Pegasus \(MVP\)

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
 
P

Pegasus \(MVP\)

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.
 
P

Pegasus \(MVP\)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top