Helping people with computers... one answer at a time.

I have several machines that run 24/7. What do I do to schedule a standard EXE file to run everyday at a specific time?

The Linux readers are all shouting "cron!" at their computers. Windows has something similar, of course. And it's very, very flexible.

Just fairly well hidden.

In Control Panel, Scheduled Tasks, fire up the Add Scheduled Task wizard. It will then allow you to specific the program to run (either from it's list, or by browsing for the program file yourself), and then define how often and/or when the program is to be run.

I actually recommend using a batch file to wrap your program, that redirects and logs all output:

foo.exe >log.txt 2>&1

This will log any problems that Windows might have finding, or starting, the program. The program can, of course, be another batch file that runs a series of commands.

The most common problem encountered is permissions relating to the account the scheduled tasks run as. Once you've created your scheduled task, you can select it's properties, and then specify that they run as a particular account, if you like.

Scheduled tasks are exceptionally handy. In fact, each of my machines has a scheduled task that runs in the middle of the night that takes care of backing up all my data, as well as a number of other administrative tasks.

Article C2372 - June 18, 2005

Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Recent Comments
1 Comment

Hy
please be more exact with "batch file". I need verry mutch to schedule my machine but I do not now anithing abouth "batch file". Some links will be verry healpefool!!

Thanks

Posted by: Albert at March 18, 2009 1:12 PM
Post a comment on "How do I schedule a program to run on my machine periodically?":





Remember Me?

(You may use HTML tags for style)

Before commenting, please...

  • READ THE ARTICLE. A comment that shows you didn't will be deleted and ignored.

  • Comment only on the article. Use the search box at the top of the page if you have a question about something else.

  • NO PERSONAL INFORMATION in the comment. No email addresses. No phone numbers. No physical addresses.

  • Anything that looks the least bit like spam will be deleted. Links to unrelated sites or links that appear to be primarily promotional will be deleted, or the comment will be deleted.

  • Don't ask me to recover lost passwords or hacked accounts. I can't. Those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...