Performing various tasks manually on a windows hosting server is a kind of headache. In order to get rid of the manual tasks, windows server is equipped with the scheduler, where you can automate a program to run at specific timings.
Unlike shared hosting, the dedicated server requires more technical skills and time to manage the server tasks. In shared hosting, the web hosting service provider is the one who manage all the server tasks. Automation becomes mandatory when it comes to the dedicated servers. Performing tasks manually on a dedicated is not so easy as you think. A simple mistake can mess up things and may damage your data.
Task automation can be performed using two different methods:
1. Using the graphical user interface.
2. Using the command line.
Scheduling Task on Windows Server using GUI #
Step 1: Go to Start >> Programs >> Accessories >> System Tools >> Scheduled Tasks.
Step 2: Click on “Add Scheduled Task” and click on “Next”.
Step 3: Select the program you wish to run.
Step 4: Specify a name to the task you want to schedule.
Step 5: Set up date and time options according to your requirements.
Step 6: Insert your system password and simply hit the “Finish” button.
Scheduling Task on Windows Server using Command Line #
If you are having access to the command line on your remote server, then the task can be easily automated using the command line interface. Using a simple command string, you can automate a task through your command line:
For Hourly Schedule:
schtasks /create /tn “Task Name” /tr “C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE” /sc hourly /ru <username> /rp <password>
The above command string will execute the specified program every hour.
For Daily Schedule:
schtasks /create /tn “Task Name” /tr “C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE” /sc daily /st 05:00:00 /ru <username> /rp <password>
The above command string will execute the specified program daily at the specified time.
Make sure you replace “Task Name” with the name of your task and the “C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE” with the program path you wish to run every hour or daily at the specified time. You can configure the timings as per your requirements and schedue any program or task to run on your dedicated server.