A Guide to Windows Task Scheduler - Cron for Windows

Windows Task Scheduler is a very useful tool built into most versions of Windows, and it functions in a similar way to Cron on Unix systems.

By Tim Trott | Windows Tips and Tricks | April 22, 2009

To find out if you have a task scheduler installed open up your control panel from the Start menu. If installed you will have an icon called "Scheduled Tasks". If not you need to download it from the Microsoft website.

Open up the Scheduled Tasks applet and you should have a window that is similar to this screenshot below.

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

I am going to show you how to create a scheduled task that will run a command every hour, but if you follow the Wizard it is a very straightforward process to create tasks that run at a certain date or time as well. For this example, I will be using my Internet File Downloader program to download a picture from the Internet every hour (a tutorial for this program will follow shortly).

This is the first stage of the Wizard, just click Next to this one.

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

This next screen will allow us to run any of the programs Windows knows about, but on this occasion, Windows does not know my download tool, so click on Browse and select the executable that you have extracted.

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

When selected the following screen will be shown, allowing you to give your task a name and select a frequency for execution. The task I will be running is on the hour, but for now, just click on "Daily" and we will change the time later. Click the following screen will appear. You need to set Start Time to 00:01 (one minute past midnight - I'll explain later)

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

You can leave this as default as we will need to manually change the details to get it to run hourly. On the next screen, you will need to enter the login details that you use. If you do not enter a password when you turn your computer on just enter your username ("Jane Doe" or "Owner") and leave the password boxes blank.

The last box is important that you tick the box that says open advanced properties, so we can tell the scheduler that we want the task to run every hour.

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

When the Advanced properties have loaded you will be shown a dialogue, click on Advanced and we can set how often to run the task. 

Now tick the box marked "Repeat Task" and change it to read Every 1 hour until the time is 23:59. This will cause the task to run every hour, 24 hours per day. If you only want the task to run between 9 am and 5 pm, for example, you simply change the Start time in the box above and the Until time in the Advanced box.

A Guide to Windows Task Scheduler
A Guide to Windows Task Scheduler

Now, this will run the task every hour, however, my Downloader program requires some parameters to run properly. We need to tell it where to get the file and where to put the file once it's downloaded. Back on the task properties screen key in the URL and Filename below to download the latest IR satellite image from the Met Office.

c:\download.exe "http:/www.metoffice.gov.uk/weather/images/ukir_sat_200705071700.jpg" "c:"

Click OK on all boxes and return to the Task Scheduler main window. If you right-click on our newly created task you can click "Test". If all is ok then you should have a jpeg image on your c: drive.

Was this article helpful to you?
 

Related ArticlesThese articles may also be of interest to you

CommentsShare your thoughts in the comments below

If you enjoyed reading this article, or it helped you in some way, all I ask in return is you leave a comment below or share this page with your friends. Thank you.

This post has 20 comment(s). Why not join the discussion!

We respect your privacy, and will not make your email public. Learn how your comment data is processed.

  1. MI

    On Saturday 29th of September 2012, Mike said

    If you need a more advanced scheduler and automation tool I recommend that you try out VisualCron. VisualCron can do everything that the normal Scheduled Tasks do but also have Task types like:

    - encrypt/decrypt using PGP
    - FTP/SSH
    - call web services
    - execute SQL queries and return back result

  2. SR

    On Wednesday 15th of February 2012, Srecak said

    Great stuff!! A simple, down to earth explanation - work like a charm :-)

  3. TF

    On Wednesday 25th of January 2012, TechFactor said

    Searched all over for this. I need it to make a simple guide for my field technicians.

    Thank you.

  4. PR

    On Tuesday 18th of October 2011, Prams said

    Advanced options in the Task's Properties window, and select the Repeat box.

  5. JS

    On Thursday 30th of June 2011, JimS said

    What I want to do is slightly different: I have a job which I want to run quite frequently. I would like to RUN-----DELAY TWO MINUTES---- RUN ----DELAY TWO MINUTE-----

    Problem is the RUN time is flexible. I could build in a sleep or Timeout in a batch file, but that's kind of lame. I just want to delay two minutes since the last time the Job ended not at an absolute time. (maybe this is not in scope for the scheduler)

  6. RC

    On Tuesday 15th of March 2011, Raj C said

    Nice, Exactly what I was looking for. Thanks.

  7. GB

    On Wednesday 17th of November 2010, Guru Bharadwaj said

    Thats exactly what i was looking for. Simple and clear. Thanks Tim.

  8. CC

    On Tuesday 26th of October 2010, Colt Cooper said

    Good walkthrough. Unfortunately Microsoft's UI makes scheduling things so clumsy that this article is necessary.

  9. AL

    On Thursday 11th of March 2010, Alan said

    Thanks so much, I've been trying to figure out how to run a task hourly under Windows and yours is the best explanation anywhere.

  10. PH

    On Tuesday 1st of December 2009, Phonsie said

    Thanks for the info on how to set it up to run every hour! As Sharon mentions this isn't very well documented by MS as far as I can see.

  11. SH

    On Monday 22nd of June 2009, Sharon said

    Thank you - this is exactly what I was looking for. Actually this is the first place I found (including Windows HELP) that actually explained how the Repeat Until... and Duration options worked together with a daily schedule.

  12. BM

    On Saturday 9th of May 2009, Bruce M. said

    The good news is that this tip let me know to use the "advanced" button to set an hourly task. However, in my updated version of Windows XP Pro (a of 5/9/09) the scheduler dialogs are quite different from those shown above. Perhaps your system is Windows Vista? If so I suggest letting readers know which OS the tips apply to! Thanks.

  13. NM

    On Tuesday 14th of April 2009, Neeraj Maurya said

    Thanks for the solution

  14. AN

    On Monday 15th of December 2008, Aniket said

    tones of thanks, it really helped me

    aniket

  15. VA

    On Thursday 27th of November 2008, Vathsa said

    Thanks a lot !!!

  16. AS

    On Friday 17th of October 2008, Ashwin said

    Excellent Suggestion!!

  17. VG

    On Friday 12th of September 2008, Varadarajan G said

    Great!!! This post helped me a lot for our setup.

    Thanks!

  18. MM

    On Friday 29th of August 2008, Martin Moores said

    Have been looking to do a similar task with a digital photoframe I am setting up, running a update program every hour. The only problem with this method is, if the PC/laptop is not on at 00:01 for example, then it will not run until the next 00:01, it will not run every hour. Bit of a pain!

  19. CC

    On Monday 12th of May 2008, Chris Collins said

    Nice, Exactly what I was looking for. You helped me out quite a bit.

  20. PM

    On Saturday 3rd of May 2008, Peter Mularien said

    Thanks, I was looking for information on how to do this. It's unfortunate that the terrible command-line tool doesn't allow this degree of flexibility :(