• Home
  • Directory
  • Geeky Fun
  • Answers
  • MakeUseOf Guides
cool websites
RSS Twitter Facebook
Subscribe to MakeUseOf. Now, 168728 members!
Aweber

Run Programs Automatically Using Windows Task Scheduler

By Tim Watson on Apr. 26th, 2009

PCs are marvelous tools, aren’t they? They can do so much for us, but they’re hardly the user-friendly home computers promised in science-fiction, which can follow any voice command and perform self-maintenance. It would be nice, at least, if your PC could at least do some things on its own. How about automatic weekly disk defragmentation or disk cleanup?

Here’s how to use Windows’ Task Scheduler to run desired programs automatically at preset time.

An overview of Task Scheduler is in order. Open it from Start Menu > Programs > Accessories > System Tools > Scheduled Tasks. Double-click “Add Scheduled Task” to open the Wizard.

run programs automatically

windows task scheduler

Your first step is to select the program to be run on a schedule. For this example, we’ll schedule one of MakeUseOf’s favorite Windows programs, CCleaner, to perform automatic system cleanup. Download it here.

how to run programs automatically

image

You’ll next choose the day and time when to run the program. For a disk-cleanup tool such as this, running daily or weekly should be just fine. I’m scheduling CCleaner to run at 6:17 PM every day.

image

image

Next, name and provide the password for the Windows user account which will run the program. At the next step, select the checkbox to open the task’s advanced properties.

image

Now, looking at how this task is set up, not much is going to happen on schedule, except that CCleaner opens. To get CCleaner to do its thing, we’ll need to add some command-line arguments, or “switches”, to the Run line. Depending on which program you’re wishing to automate, this is where things start to get different. To find out what switches exist, if any, you may check the program’s documentation and help files, or just Google it.

image

For CCleaner, adding “/AUTO” to the Run line will have the program perform a disk cleanup silently and in the background, then close when done. Let’s go back to the task properties, where I’ve added the switch to the Run command.

image

After hitting OK, CCleaner will run on your specified schedule.

There are other solutions to run programs automatically on a specified schedule or in response to a system event. What are your own favorites? Give us some ideas in the comments.

stumble it!

(By) Tim Watson is a full-time student, husband, father of two, and head of Dork Lotus Enterprises. He's on Twitter @TimDub.

Enjoyed the article? Subscribe to MakeUseOf to get daily updates on new cool websites and programs in your email for free. You'll also get free printable cheat sheets to your favorite programs

Your Email:




More about: pc maintenance . scheduled tasks . windows tips

12 Comments

2009-04-27 00:26:37
SleepingPanda

This is great. With the addition of a 1TB hard drive to my PC, I got quite tired of manually using Vista’s Backup and Restore Center each and every time I wanted to make a simple weekly backup without having to download some other third party app. The answer? Automate it with Task Scheduler! I used this guide http://maximumpcguides.com/windows-vista/schedule-a-complete-pc-backup/

Reply to this comment
2009-04-27 03:16:25
Alessandro
Subscribed to comments via email

hello!
with regard to defrag?
every how many days should be done?
the command does not work with defragmentation: C: \ Program Files \ Defraggler \ Defraggler.exe / AUTO

Reply to this comment
2009-04-28 06:33:57
Aibek

I’d recommend doing it about once a month.

Reply to this comment
2009-04-28 06:25:20
guru

Remember about space in command line

Reply to this comment
2009-04-28 22:02:41
Juscelino M. Acevedo

As familiar as I am with Task Scheduler and CCleaner, I never thought about using them together. This is an excellent tip which gives me other ideas due to the fact that I am a clean freak when it comes to my computer(s).

Keep up the good work.

Reply to this comment
2009-04-29 08:02:21
Nick
Subscribed to comments via email

Well I tried it in Vista, I don’t know if its the same, but if you could write one for Vista that would be awesome. But I hope it’s the same and I hope it will work!

I only going to run CCleaner once a week. :P

Reply to this comment
2009-04-29 11:28:56
Juscelino M. Acevedo

I may be wrong, but unless the writer is using a theme in XP, those screen shots look very much like Vista windows.

Reply to this comment
2009-04-29 12:16:45
Nick
Subscribed to comments via email

You are wrong :P It is Most likely Windows XP Pro. Windows Vista has a completely different interface. Plus windows Vista Task Scheduler is 100 percent different, so that gives it away also. Plus there are no Vista Icons, those are all XP Icons.

(Comments wont nest below this level)
2009-04-29 13:26:12
Juscelino M. Acevedo

Don’t worry, I don’t mind being wrong once in a while. I have not being around a Vista machine in about a month, so I guess it’s easy to forget what things look like… :-)

2009-04-29 15:05:51
Nick
Subscribed to comments via email

Don’t worry either, I understand, one of my good friends had never used Vista before and right now is just currently starting to use Vista and when switches to Vista I will be switching to Windows 7, hahaha. I can’t go back to using XP anymore, just can’t It is impossible.

Reply here
2009-12-22 14:14:35
Ivan

i just tried it but i dont have a password for my user and it says that you need a password, so the program didnt run, Anyway to make it work without a pass?

Reply to this comment
2010-01-24 11:07:40
Todd
Subscribed to comments via email

Ivan, I know of a couple workarounds. If you check the “Run only if logged in” box in the task scheduler, it will run w/o a password, but like it says, only if you’re logged in.

The second is a registry edit. Go to http://www.kellys-korner-xp.com/xp_tweaks.htm. Scroll down to line 67: Run Scheduled Tasks w/o PW Home. Click on Home, the instructions to use VBS Files at top of web page. This is says it’s only for XP, but it might work on Vista/win7. I STRONGLY recommend that you backup your registry first.

There is a third option as well. Create a login password for your account, then click Start, Run and type “control passwords2″ w/o the quotes, then highlight your user name then uncheck the “users must enter name….”. Now you won’t have to put in a password to login, it will boot right to the desktop just like it did before, but you’ll have one to put in the Task Manager. :-)

Reply to this comment
Reply
Note: Comments with abusive content, sarcastic grammar nitpicking, self-promotion will not be published. All comments are moderated.
Click here to cancel "reply".

TopicsMUO Guides
  • Browsing
  • Cool Software
  • Web Apps
  • Lists of Tools
  • How-To Tips
  • Windows
  • Mac
  • Linux
  • Gaming
  • Mobile Apps
  • Polls
  • Geeky Fun
  • BitTorrentThe Easy Guide
  • iPhoneUnofficial Manual
  • ItunesThe Big Book
  • LinuxGetting Started
  • MacBeginner's Guide
  • MoviesFor Movie Addicts
  • PC BuildingThe Idiot's Guide
  • ProductivityProductivity Guide
  • PhotoshopThe Idiot's Guide
  • TwitterBest Tips & Tricks
  • More Guides
Follow us on Twitter
Be Our Friend on Facebook
MakeUseOf Staff
Editors:
  • Editor in ChiefAibek Esengulov
  • MakeUseOf Directory's EditorKaly
  • Managing EditorMark O'Neill
  • Assistant EditorJackson Chung
  • MUO WP GuyJorge Sierra
  • PDF ManualsSimon Slangen
  • Promotion & SEORyan Dube
  • Sys AdminKarl Gechlik
  • MakeUseOf NewsletterSaikat Basu
  • MakeUseOf Answers EditorTina Sieber
Staff Authors:
  • ( Ask The Admin )Karl Gechlik
  • Tina Sieber
  • ( Tech Crazy )Varun Kashyap
  • ( The Things I Do )Saikat Basu
  • ( simonslangen.com )Simon Slangen
  • ( Free Writing Center )Ryan Dube
  • ( Super Subconscious)Jeffry Thurana
  • ( Tapping Thought )Dean Sherwin
  • ( Mac Photography Tips )Bakari Chavanu
  • ( timmyjohnboy.com )Tim Lenahan
  • ( Boulder Community Computers )Justin Pot
  • Other Active Authors ...

 

© 2010 MakeUseOf . Designed by kailoon AboutContactSubmit AppWrite For UsArchivesMobile VersionDisclaimer visitor stats