Subscribe to How-To Geek

Setup CCleaner to Automatically Run Each Night in Vista or XP

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 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)

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 07/25/08 and tagged with: Windows Vista, System Administration

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your email below:


Comments (12)

  1. InDiSent

    Sweet, thanks.

  2. USBman

    I'm still sticking with my comment from yesterday's post; I think there is potential in using a separate, portable version for specific tasks. Say, for example, you followed these directions, but didn't necessarily want CCleaner to 'clean' all the same things when you did NOT run it on the set schedule - rather than having to then switch these other features on or off everytime you ran it on it's own, you can simply have a separate version, left untouched and waiting for your every command.

    …anyhow, just another option to add to this helpful tip!

  3. Rob

    I always use the options to set the cookies I want to keep then CCleaner only deletes the ones I don't want.

  4. jsmorley

    One note. I think cleaning up cookies is an important part of what CCleaner does. I notice that you turn off this feature in your "automated" solution. I would make a suggestion. If you look at the "options" button on CCleaner, it has a place where you can tell it to ignore selected cookies when it runs, while allowing it to get rid of all the tracking cookies and other cookie crumbs that are installed when you surf around the net.

    What I did was to have CCleaner get rid of all cookies, then surfed around to my favorite web sites where I need to login. Log in to each, then go back to CCleaner and "exclude" the cookies which have been created by your favorite sites using "options / cookies". Now you can run CCleaner with cookie cleanup turned back on in your automated task, and you get a better result.

    Thanks for the article. Good one.

  5. The Geek

    @jsmorley:

    That's a really good technique… I never thought of doing it that way. =)

  6. Steve

    I wish there was a setting that would automatically run cleaner prior to shutdown.

    sc

  7. Bruce

    Whenever I run CCleaner I get the following RUNDLL popups: Error in InetCpl.cpl Missing entry:Clearmytracksbyprocess

    It did not use to do this but I don't know what might have been deleted to cause this to happen. Any thoughts?

  8. The Geek

    @Steve

    I've been looking into that, actually. The problem is that while you can assign a logoff script through group policy or an obscure registry hack, the process can only run with regular user credentials.

  9. W.

    I think it will be just great, if there was a way to run ccleaner autmatically each time i close my browser, there may be a program around there that would be able to do that…
    well, why may you do something if a program can do it for you?

  10. Chris

    Theres an option in ccleaner to run on startup why dont evry1 do that? Its quite quick too!

  11. abhishek

    thanks for the article,

  12. Rixster

    TWIMC: from the changelog of CCLeaner v2.10.618 (released today).
    […]
    - Added /SHUTDOWN command-line parameter to shutdown the computer
    after cleaning. Only works with /AUTO.
    […]


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.