logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Run CCleaner on a schedule

CCleaner is an excellent free utility for Windows and it contains many cleanup functions that will remove junk files from the computer. It eliminates errors from the registry, clears caches, erases temporary files and so on. One thing it doesn't have though, is a scheduler. You can't run it at 9am or 6pm every day to keep the disk drive clean, for example. However, there is a way to do this using Windows built in scheduler.

In Windows 7 or Vista, click Start, enter sched and then click Task Scheduler in the Start menu. Click Action, Create basic task in Task Scheduler and a new window opens. In the name box enter a name for the task, such as CCleaner AutoRun. There's a description box, but it is not important and it can be ignored.

Task Scheduler

Click Next and you can choose when you want the task to run, such as daily, weekly, monthly and so on. Select Daily and click Next. You can set the day the task is to start and today's date is entered by default, which is fine. You can then set the time at which it is to run. It's up to you when it is most convenient.

Task Scheduler

Click Next and you'll be asked what action the task is to perform and we want to start a program.

Task Scheduler

Click Next and you the have to enter the command to run the program. It is normally "C:\Program Files\CCleaner\CCleaner.exe" (including the quotes), but if CCleaner is stored somewhere else then use the path to its location. In the Add Arguments box enter /AUTO. This is a command line switch that runs CCleaner in the background without you having to click menus and buttons. It tells it to silently load, do its job and then quits. Click Next and then Finish.

Task Scheduler

There's just one snag. When it runs it triggers User Account Control, which asks your permission for it to run. If you turn off UAC in User Accounts in the Control Panel then it won't do this, but this would lower the security of Windows. There is a better solution.

Select Task Scheduler Library in the left pane of Task Scheduler and you'll see the task we created listed in the middle. Double click it to open its properties window and on the General tab tick the box near the bottom, Run with highest privileges. Click OK and now CCleaner will run on the schedule you have set without triggering UAC. Nothing appears on the screen and it runs in the background.

Task Scheduler

CCleaner does all the tasks that were set the last time it was run, so run it and set the cleanup functions you want and then quit. The only thing you can't do is to clean the registry. This is to avoid problems - you don't want it messing with the registry without your knowledge.

copyright