Creat & Schedule a Task on Window’s Server

This is an Often scenario for .Net stack developers (really?); not so often, but sometime we get a requirement where we want to run an executable file repeatedly. Let me call it TASK(running executable file repeatedly ) as task seems more like what suits a developer’s blog.

We need basically 2 things in this case:

  1. An executable programme that you want to run repeatedly.
  2. Task Scheduler(it comes with your windows operating system)

Now let’s see how it works:

Open Task Scheduler on window’s machine.

Click on Create task….

It will open window having multiple tabs and selected tab as “General” by default. So we will go tab-by-tab and see how to configure it.


This tab collects some basic stuff about the task we are going to create.
(Name for the task and a small description for it).
Trust me other than developers can not understand(sometime after 1 appraisal the developers too can’t) what this task does by name only. So please put a layman friendly description for the task.

There are also some security options and we can decide over those as below:

  1. Which user account to be used while running the task.
  2. Whether task shall be run only when user is logged on
  3. And setting the privileges for the task

If you are not so familiar with those you can ignore security option section and can move to “Triggers”



Trigger tab is actually what we want to do with the executable file. i.e. schedule it to run repeatedly. Its an easy interface where user can define whether he wants to run the task. There are some basic setting to repeat the task.

  1. One time
  2. Daily
  3. Weekly(this gives the option for selecting various days)
  4. Monthly

And some advance settings to repeat task for every  1 Hour/ 5 Hours/ 1 Min/ 5 mins… etc.

User can also define if task should stop if it does not complete in a timespan.
And the most important expiry date(in case of medicine only, if you live in India) for the task.



Move to Action tab where user defines what shall the task do when it is triggered.
There are 3 main options and user will get settings as per the selection. In this example I chose Start a program and provided the path for program to execute.

If in case your program needs some additional(external) arguments you can set it from this screen.



This tab asks user to choose some conditions that works in combination with Trigger and decides whether task should run. If any of the condition defined on this screen is not true, task will not be triggered.

These conditions are mainly system level conditions, that general user should not worry about.



Some basic settings about the task like:

  1. To start the task as soon as possible if it somehow missed the scheduled start.
  2. Whether to restart the task if it fails once or manytimes
  3. When to stop the task if it keeps running
  4. And to delete the task if is not running since a time span.
  5. And last but important point, whether parallel instances allowed for same task?(You will find this useful when you have to trigger the task after some seconds. But How to do that??)



I keep it disable personally. If you keep it enabled, it will log the task task detail under this tab.

Cheers if you find this useful else go to Off Work.


Say something : I accept all the "Humer&Critic"

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s