Setup CCleaner to Automatically Run Each Night in Windows 7, 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)
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.
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.
Give the task a memorable name like “Run CCleaner”
Choose “Daily” or “Weekly”, depending on how often you want the task to run.
Now choose a time of the day that your computer is usually on, but you aren’t using it.
On the next screen, choose to “Start a program” and go to the next screen.
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] image[14]](http://www.howtogeek.com/wp-content/uploads/2008/07/image141.png)
On the Summary screen, make sure to click the box for “Open the Properties dialog” before clicking on the Finish button.
Now you’ll want to choose the option for “Run with highest privileges”, so that the task will automatically run with administrator privileges.
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.
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.
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”
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.
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.
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)
You’ll be asked to enter the password for your user account.
Make sure to check the box for “Open advanced properties” and then click on the Finish button.
Now you’ll want to modify the Run command to include the /AUTO switch at the end. Make sure to put a space between.
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.
You can test out your scheduled task by right-clicking on it and choosing Run. CCleaner should open and run in the background.
Download CCleaner from ccleaner.com (Download the Slim build which doesn’t bundle the Yahoo! toolbar)

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


Sweet, thanks.
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!
I always use the options to set the cookies I want to keep then CCleaner only deletes the ones I don’t want.
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.
@jsmorley:
That’s a really good technique… I never thought of doing it that way. =)
I wish there was a setting that would automatically run cleaner prior to shutdown.
sc
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?
@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.
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?
Theres an option in ccleaner to run on startup why dont evry1 do that? Its quite quick too!
thanks for the article,
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.
[...]
Whenever I run CCleaner I get the following RUNDLL popups: Error in InetCpl.cpl Missing entry:Clearmytracksbyprocess
How do I fix this??
If I setup this task with an admin account, will CCleaner clean all other Windows accounts, their temp files, cookies and so on ? If not, is thee a way to automate CCleaner to run every night and clean data for ALL Windows profiles ?
great stuff
I am using Karen Kenworthy’s show stopper to automate a bunch of shutdown tasks to run Spybot, antivirus, ccleaner, jkdefrag and others. When all are done showstopper will suspend, hibernate or shut down your computer for you. I put a daily and a weekly button on desktops for different levels of cleaning actions.
Rick
What cookies are you trying to keep? I have CCleaner blast everything and Mozilla still retains my passwords. That’s all I need. I figure I might be missing out on something cool, or I’m doing something awesome and not realizing it.
this solution only runs the application cleaning aspect of ccleaner … most people use it for its registry cleaning functions …. no one has yet to find an auto run command for that part of the program … that I’ve found anyways … =:o(
This was the most insanely useful tutorial – thanks for setting it up so us folks without advanced tech know-how could still use it!