I need help creating a scheduled task that runs a batch file in Windows 2003 Server
Hello,
I am trying to schedule a batch file to run monthly. When I go to add a schedule task it asks me what program do I want to run, do I select "Command Prompt" or to I point to my script directly. When I select "Command Prompt" after I see in the RUN text box
C:\WINDOWS\system32\cmd.exe /k am I able to point to my script here by using /s? Please help, sorry for the confusing question. Also do I have to place my batch file in a certain location for this work.
Thanks
September 10th, 2012 5:06pm
Hi,
following might help
How to use the Windows Task Scheduler
http://www.iopus.com/guides/winscheduler.htm
Create a scheduled task in Windows Server 2003
http://www.hosting.com/support/windows-server-2003/create-a-scheduled-task-in-windows-server-2003
How do I create a Scheduled Task in Windows Server 2003?
http://onlinehelp.hostbasket.com/server-hosting/server-management/windows/1095-how-do-i-create-a-scheduled-task-in-windows-server-2003.html
How to use Schtasks.exe to Schedule Tasks in Windows Server 2003
http://support.microsoft.com/kb/814596I do not represent the organisation I work for, all the opinions expressed here are my own.
This posting is provided "AS IS" with no warranties or guarantees and confers no rights.
- .... .- -. -.- ... --..-- ... .- -. - --- ... ....
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2012 5:26pm
Thank you for that! I am still a bit confused. Which of the following is the correct way to run a batch script using a task scheduler.
Run: C:\WINDOWS\system32\cmd.exe /K C:\Test.bat
or
Run: C:\test.bat
September 10th, 2012 5:53pm
I prefer running C:\batchfile.bat, batch files are always executed using cmd so, no need to specify that explicitly in scheduled task.I do not represent the organisation I work for, all the opinions expressed here are my own.
This posting is provided "AS IS" with no warranties or guarantees and confers no rights.
- .... .- -. -.- ... --..-- ... .- -. - --- ... ....
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2012 6:10pm