Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Scheduling CCleaner

It’s no secret that crap (pardon the language) piles up on our computers over time. Temporary files that don’t get cleaned up properly, assorted caches, histories, and backups of files that we might never need all seem to accumulate and can even negatively impact performance.

I use the word “crap” here specifically, because that’s what that initial “C” in CCleaner originally represented – “Crap Cleaner.”

Regardless of the political correctness of its name, then or now, CCleaner is a useful tool in managing the accumulation of “stuff” on your computer that might be doing nothing more than wasting space.

In the past, we’ve focused on running CCleaner as needed to clean things up when we think of it or encounter a problem.

The beauty of computers is that they’re very good at doing things automatically. That includes not only creating crap, but cleaning it up as well.

Become a Patron of Ask Leo! and go ad-free!

Backup first

I wouldn’t be me if I didn’t remind you to back up your machine before you run CCleaner, or any cleaning tool, particularly for the first time.

While it’s rare for CCleaner to actually break anything, you may realize after a cleaning that you cleaned something you didn’t  want to lose. A restore to a full backup image can quickly help you recover from that, so that you can then adjust the CCleaner settings and move on.

Run CCleaner and choose settings

If you haven’t already, download CCleaner (making sure to select the free version), install it, and then run it.

CCleaner UAC

CCleaner does require administrative access to run. It will clean up areas on the machine that are system controlled and thus require administrative privileges.

Spend a few minutes examining the items listed in CCleaner’s “Cleaner” section:

CCleaner Cleaning Options

Make sure to scroll through the entire Windows tab for components included with Windows and the Applications tab for applications that CCleaner knows how to clean.

Select only those items that you want to have automatically cleaned up on a regular schedule. I’ll discuss some of the implications below, but the important thing to realize here is that whatever you select will be automatically removed without your involvement on each automated run of CCleaner.

After selecting what you want cleaned, go ahead and run an analysis:

CCleaner Analysis

In fact, you might even want to run an actual cleaning to make sure that the result are as you expect them to be.

Once you’re satisfied, click the Options icon, then the Advanced button, and make sure that “Save all settings to INI file” is checked:

CCleaner Save To INI

This causes all of the options that you’ve selected to be written to an .ini file for use by CCleaner when it is run automatically.

Important: If you later run CCleaner and change any settings while this checkbox is checked, you will be changing the settings for the automated run as well.

Close CCleaner. It’s time to schedule things.

Schedule the cleaning

In Control Panel, click Administrative Tools, double-click Task Scheduler, and in Task Scheduler, click Task Scheduler Library (on the left):

Task Scheduler

As you can see, this will list a number of pre-existing scheduled tasks.

Click Create Basic Task… on the right.

Create Basic Task

Give this task a name. I selected “CCleaner Weekly Cleaning” in the example above.

Click Next.

Scheduling A Task Trigger

Task Scheduler actually has a number of ways that tasks can be initiated. In our case, we’ll set up a weekly task.

Click Next.

Scheduling a Weekly Task

In the example above, I’ve configured the task to run beginning the following Sunday, at 1AM, and then repeat every Sunday thereafter. Choose whatever time or schedule you might prefer.

Click Next.

Task Scheduler - What to Do

Select “Start a program” and click Next.

Task Scheduler - Start A Program

The program to be run is “C:\Program Files\CCleaner\CCleaner.exe” (including the quotes, as there’s a space between “Program” and “Files”). If you’re running 64-bit Windows, you may want to run CCleaner64.exe.

The argument is “/auto”, which tells CCleaner not to bother displaying its user interface, but get right to cleaning when it’s run.

Click Next.

Task Summary

Before clicking Finish on the summary screen, make sure that “Open the Properties dialog for this task when I click Finish” is checked. There’s one more thing we need to specify.

Scheduled Task Properties

As we saw when we started CCleaner manually, it needs administrative access. Make sure that “Run with highest privileges” is checked to enable that for the scheduled task. (You might also want to change the “Run only when user is logged on” setting.)

Click OK. Close all the windows and you have your weekly scheduled CCleaner cleaning.

The implications of automated cleaning

When you run CCleaner or any cleaning tool manually, you’ll expect that certain things will be removed. That’s the point, after all. When cleaning happens automatically, it’s easy to forget and you’ll sometimes be surprised when something goes missing.

With the schedule put into place above, CCleaner will run silently once a week and clean things up. That means that after the CCleaner run:

  • You’ll be logged out of all the sites that relied on cookies to keep you logged in if you allow CCleaner to clear cookies. You’ll simply need to re-login to those sites as you visit them again.
  • You won’t find any deleted documents in your recycle bin, if you’ve allowed CCleaner to empty it.
  • You’ll find that some conveniently remembered bits of information in various programs (for example, recently typed URLS in IE) may have been forgotten, if you allowed CCleaner to clean them.
  • The first few page fetches in your browser might take a little longer as it has to rebuild the cache if you let CCleaner clean it.
  • And so on…

You get the idea. CCleaner is great at cleaning things up.

You’ll just want to make sure that they are things you actually do want to have cleaned up – particularly once you allow the process to happen automatically.

 

 

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

12 comments on “Scheduling CCleaner”

  1. Leo, if any software can be manually run with only ONE click by the user, can that program also be scheduled to run automatically using the same Windows Task Scheduler procedure outlined in the above article? I’m thinking in particular about anti-malware software that often allows for scheduled scans only for licensed users, but not in the free version. For example, the free Malwarebytes AntiMalware (MAM) requires that a user click at least TWICE (on two different “Scan” buttons) to run the scan; therefore I would assume that the procedure in the article cannot be used to automate a scheduled scan for MAM – is this correct? Is the lack of a “Save all settings to INI file” option in MAM a deal killer also? Thanks…

    Reply
    • Let me throw in a plug for MAM being worth the money :-).

      That being said, what really kills the deal for automating the free version is the lack of a /auto switch or equivalent. As you point out, when you run it – even automatically – it’s going to wait for someone to click a button.

      Reply
  2. Thanks Leo for this great article.
    Glad to find that I’m not that crazy with running CCleaner quite often to get rid of garbage stuff.

    Actually, I’m using a batch file to lock my computer at the end of the day, which includes between others, pausing the music, run an auto CClean and finally lock the computer.
    (following is my cmd prompt:
    “C:\Users\User\pauseWMP.vbs”
    “C:\Program Files\CCleaner\CCleaner.exe” /AUTO
    ipconfig /flushdns
    rundll32.exe user32.dll,LockWorkStation).

    Thanks again.

    Reply
  3. Kindly advise how to access and pay (Amazon I presume) for Facebook 7 Backup and, preferably, advise if there is any more complete book you’ve edited on Windows 7 and 8 which I can purchase?…
    While I’m still on this XP Pro, I’ve recently acquired an ASUS Lap Top Windows 8 so as to understand what it’s all about, while Phyl, my wife over 6o years, has a new Windows 7 so we need plenty of tuition which I’m willing to buy..Keith McG.

    Reply
  4. the auto run of CCleaner is GREAT! I’m 83 years young and would love to create a batch file that would do the following: run CCleaner; run Auslogics disk defragger; run a malware remover ( Malwarebytes Antimalware?) or equivalent malware freebe; run Advanced System Care free version.

    This is what I do EVERY night before I shut things down; anybody out there up to the challenge for this comprehensive cleanup/tuneup at shutdown?

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.