In a previous post, I explained an easy method for scheduling tasks on a Linux server using cron jobs. On a Windows server, there is a similar process that allows you to schedule programs to run at specified times.
Task automation is a very important part of running a dedicated server because it minimizes the amount of routine manual work you have to perform. For example, if you need to routinely copy DNS files from virtual private servers, you can setup an automated task to do it for you.
There are two ways to automate tasks in Windows, depending on whether or not you have access to the graphical user interface (GUI).
1. Click the “start” button and then navigate to Programs > Accessories > System Tools > Scheduled Tasks.
2. Click “Add Scheduled Task” and click “Next”
3. Choose the program you want to run
4. Assign a name to the task
5. Configure the date and time options based on when you want the task to run
6. Enter your system password and then click “Finish”.
Command Line Method
If you are using a remote server and have command line access to it, you can easily automate your tasks with a single command string. Type the following line from the command prompt:
schtasks /create /tn "Webapp Task" /tr "webapp-prog.exe" /sc hourly
Replace “Webapp Task” with the name of your task and “webapp-prog.exe” with the name of your program (feel free to add flags). Finally, the “hourly” tells it to execute every hour. You can change this to another timing method according to your needs. For a complete list of available options and configuration settings, see this documentation.
Cybercon.com specializes in windows dedicated servers Hosting with more than 15 years industry experience. All of our 24 hour support staff is experienced in configuring and troubleshooting windows servers.