Setup CCleaner to Automatically Run Each Night in Windows 7, Vista or XP

By Lowell Heddings on July 25th, 2008

After writing the article yesterday about how to run CCleaner silently through a shortcut or a hotkey, many people expressed to me that they’d like to know how to run it every single night on a schedule, so I’m writing that up for everybody’s benefit.

Setup Your Options

You’ll need to decide which settings you want to run when CCleaner is run automatically‚Ķ for instance, I’d look at whether or not you want to clean out your cookies or recent documents (which is a feature I use often, so I don’t want them cleaned out)

image

Next, take a trip over to Options \ Advanced and make sure that the “Save all settings to INI file” option is checked (it should be checked by default). This makes sure that whatever settings you’ve chosen are saved out to an INI file in the same directory.

image 

Create the Scheduled Task in Windows 7 or Vista

Open up Task Scheduler by typing it into the Start menu search box, or browsing to Accessories \ System Tools.

Once you are there, click the link for “Create Basic Task” on the right-hand side.

image[2]

Give the task a memorable name like “Run CCleaner”

image[5]

Choose “Daily” or “Weekly”, depending on how often you want the task to run.

image

Now choose a time of the day that your computer is usually on, but you aren’t using it.

image

On the next screen, choose to “Start a program” and go to the next screen.

image[11]

Now you’ll need to browse down to the CCleaner executable file, which is typically found in the following location, but could be elsewhere:

C:\Program Files\CCleaner\CCleaner.exe

Make sure to add the /AUTO switch to the “Add arguments” box.

image[14]

On the Summary screen, make sure to click the box for “Open the Properties dialog” before clicking on the Finish button.

image

Now you’ll want to choose the option for “Run with highest privileges”, so that the task will automatically run with administrator privileges.

image

Optional: You can also take a look at the Conditions tab, and choose the option to start the task only when the computer is idle for a certain amount of minutes.

You should notice the “Wake the computer to run this task” option as well… if you usually put your computer into Sleep mode, you can check that box so that the computer will wake up to run CCleaner.

image

You can test out the task by right-clicking on the item in the list, and choose Run. CCleaner should run silently in the background.

image

You can look around at some of the other options… for instance some people run CCleaner a couple times a day (although that seems a little excessive to me… once a week would probably be good enough)

Create the Scheduled Task in Windows XP

If you are using Windows XP, there is a whole different wizard you’ll have to go through… open up Scheduled Tasks in Control Panel or from the Start Menu’s Accessories \ System Tools section, and then click on “Add Scheduled Task”

image 

If you’ve installed CCleaner using the regular installer, you should see it in the list. If not, then you’ll have to browse down to the location of the file.

image

Then you’ll want to give the task a helpful name, and choose “Daily” or “Weekly”, depending on how often you want to run it.

image

Now choose a time of the day that your computer will be on, but you won’t be using it, like 1AM (or if you are like me, 8AM)

image

You’ll be asked to enter the password for your user account.

image

Make sure to check the box for “Open advanced properties” and then click on the Finish button.

image

Now you’ll want to modify the Run command to include the /AUTO switch at the end. Make sure to put a space between.

image

If you look at the Settings tab, you’ll see the options to only start the task if the computer is idle, and also the same option to “Wake the computer to run this task”, which is useful if you usually put your computer into standby mode when you aren’t using it.

image

You can test out your scheduled task by right-clicking on it and choosing Run. CCleaner should open and run in the background.

image

Download CCleaner from ccleaner.com (Download the Slim build which doesn’t bundle the Yahoo! toolbar)

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 07/25/08
More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!