Where technology and gadgets come together and play

A Guide to Windows Task Scheduler

Running progammes on a schedule

Written By on in Windows

588 words, estimated reading time 3 minutes.

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. In this tutorial, we will look at how to get a program to run every hour.

To find out if you have 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 straight forward 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 (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 next and 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 your logon 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 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 hours 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 in order 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 to 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.

Last updated on: Saturday 17th June 2017

 

Comments
Mike

Mike

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

Reply to Mike
Srecak

Srecak

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

Reply to Srecak
TechFactor

TechFactor

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

Thank you.

Reply to TechFactor
Prams

Prams

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

Reply to Prams
JimS

JimS

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)

Reply to JimS
Raj C

Raj C

Nice, Exactly what I was looking for. Thanks.

Reply to Raj C
Guru Bharadwaj

Guru Bharadwaj

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

Reply to Guru Bharadwaj
Colt Cooper

Colt Cooper

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

Reply to Colt Cooper
Alan

Alan

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.

Reply to Alan
Phonsie

Phonsie

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.

Reply to Phonsie
Sharon

Sharon

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.

Reply to Sharon
Bruce M.

Bruce M.

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.

Reply to Bruce M.
Neeraj Maurya

Neeraj Maurya

Thanks for the solution

Reply to Neeraj Maurya
Aniket

Aniket

tones of thanks, it really helped me

aniket

Reply to Aniket
Vathsa

Vathsa

Thanks a lot !!!

Reply to Vathsa
Ashwin

Ashwin

Excellent Suggestion!!

Reply to Ashwin
Varadarajan G

Varadarajan G

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

Thanks!

Reply to Varadarajan G
Martin Moores

Martin Moores

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!

Reply to Martin Moores
Chris Collins

Chris Collins

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

Reply to Chris Collins
Peter Mularien

Peter Mularien

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 :(

Reply to Peter Mularien

 

Leave a Reply

Your email address will not be published.





If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Copyright © 2001-2018 Tim Trott, all rights reserved. Web Design by Azulia Designs

This web page is licensed for your personal, private, non-commercial use only.

Disclaimer, Privacy & LegalSitemapContact Me