How to Schedule a Task on a Windows Server

May 15, 2011 / How-to Guide

Executing various tasks manually on a UK windows hosting server is a kind of headache. To eliminate manual duties, the Windows server includes a scheduler, which allows you to plan a program to execute at certain times.

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 manages all the server tasks. Automation becomes mandatory when it comes to dedicated servers. Performing tasks manually on a dedicated is not as 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 a Task on Windows Server using GUI

Step 1: Go to Start >> Programs >> Accessories >> System Tools >> Scheduled Tasks.

Schedule task on windows server

Step 2: Click on “Add Scheduled Task” and click on “Next”.

scheduled_tasks_wizard

Step 3: Select the program you wish to run.

Select a program

Step 4: Specify a name for the task you want to schedule.

Task name

Step 5: Set up date and time options according to your requirements.

date and time

Step 6: Insert your system password and simply hit the “Finish” button.

Password

Scheduling a 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.

Spread the love