How to Schedule a Task on a Windows Server ?
Performing numerous tasks manually on a UK windows hosting server could be a reasonably headache. So as to get rid of the manual tasks, windows server is equipped with the scheduler, wherever you’ll automate a program to run at specific timings.
Unlike shared hosting, the dedicated server needs a lot of technical skills and time to manage the server tasks. In shared hosting, the web hosting service provider is that the one who manage all the server tasks. Automation becomes necessary when it comes to the dedicated servers. Performing tasks manually on a dedicated isn’t really easy as you think that. An easy mistake will mess up things and may damage your data.
Task automation can be performed using two different methods:
- Using the graphical user interface.
- 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 schedule any program or task to run on your dedicated server.