Link to home
Start Free TrialLog in
Avatar of jjrr007
jjrr007

asked on

Scheduled Task

Experts,

I am using Windows 2000 Professional.  How do I create a scheduled task to run a command in MS-DOS.

Thanks a lot.
Avatar of Jay_Jay70
Jay_Jay70
Flag of Australia image

Hi jjrr007,

you need to create a batch file to run the command you want and add it as a task
Avatar of centrepc
centrepc

open a notepad enter the dos command you are trying to run.  Save as xxx.bat
make sure it doesn't save as xxx.bat.txt

Note the name of the bat file cannot be the same as a true dos command or you will end up in a loop.  

Then schedule the *.bat that you created.  

If you have problems with getting the scheduled job to run properly, don't use the Scheduler control panel. Instead, schedule your bat file with the AT command. See:

  http://support.microsoft.com/default.aspx?scid=kb;en-us;313565&sd=tech
Avatar of Kevin Hays
I know this will work for 2003/xp, I believe the command "AT" is used instead of schtasks though for 2000.

Here is just a simple command that will defrag the c drive via a task schedule.

SCHTasks /Create /RU System /SC Weekly /D Sat /SD 08/06/2005 /ST 22:00:00 /TN Disk_Clean /TR "Cmd /c defrag c: -f"


If that doesn't work in the schedule task "run" box just type in "cmd /c defrag d: -f" or any other command you wish from there.

in the "start in" box key in "Cmd".

Just like the others have stated you can always use a batch file with the command in it and just schedule the .bat file to run.

kshays



Avatar of jjrr007

ASKER

I see scheduled tasks (it is a large corporate setting so they may have disabled this setting)?  The article you provided and the instructions all of you provided say that I need it.  

At home I have Windows XP Home.  I can reach scheduled tasks by going to Start- Programs- Accesories- System Tools.  Can I reach scheduled tasks by using the run command?  Maybe I can check the computer at work using the run command.  

Also, if I don't have scheduled tasks installed on my computer at work, is their a scheduler program I can get from the Internet?
Avatar of jjrr007

ASKER

I meant to say I don't see scheduled tasks program.  Thanks.
The scheduler (in 2000) should be a process named MStask.exe if you check with Task Manager. If it's not there then it means the Task Scheduler service has not been started (it can be started via the services control panel). If someone has locked down the machine so you can run the scheduler then I guess you will have to ask them to turn it on for you.

Yes, there are a number of task scheduling programs on the Internet, some may be free as well. I don't have their names, but you can search with Google or something like that.

On XP the Task Scheduler is not a separate task.
Avatar of jjrr007

ASKER

At this point I need to make sure that I have scheduled tasks available on the computer.  Could I start the scheduled task by going to run - "Mstask.exe"?  If not what is the command that I can use in the run box.  

I need to make sure that I have it installed first before trying to schedule a task.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of r-k
r-k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jjrr007

ASKER

I will try this on Monday. I will let you know.  Thanks.
Thanks and good luck.