So you want your Windows 7 Operating System to perform a daily enhanced Disk Cleanup? Well, so do I. So lets get this party started.
Step 1. Click on Start and then click Control Panel.
Step 2. In Control Panel change the View to Small Icons.
Step 3. Now click on Administrative Tools.
Step 4. Now double-click on Task Scheduler.
Step 5. On the right hand side of the Task Scheduler window, click on Create Task.
Step 6. In the Name field, you can type "I love crickets", but to make our task easier to find and manage, I would suggest you label it for what it is, ie., Daily Enhanced Disk Cleanup.
Step 7. In the Security Options area, you are asked to use the default account, which is the account you are currently logged in with. If your account is not an Administrator account you will not be able to create this task. Also, if your account does not have a password, you will not be able to run this account.
Step 8. We want to run this task while we are not actively using this machine, so let's select the "Run whether user is logged on or not" radio button.
Step 9. Leave the "Do not store password" checkbox unchecked.
Step 10. Select the "Run with highest priveledges" checkbox.
Step 11. Leave the Hidden box unchecked as well. We wouldn't want to make it harder for us to find the task if we have to edit it.
Step 12. Click on the Triggers tab.
Step 13. Click the New button.
Step 14. For Begin the task. select "On a Schedule".
Step 15. Select Daily to Recur every 1 days.
Step 16. Change the Start time to 2:00 AM
Step 17. Now check the Enabled checkbox then hit OK.
Step 18. Click on the Actions Tab.
Step 19. Click the New button.
Step 20. In the action dropdown menu, select "Start a program".
Step 21. In Program/script, type C:\Windows\System32\cleanmgr.exe
Step 22. For Add Arguments, type in /sagerun:1
(Please note: To utilize the /sagerun:1 argument, you must follow the steps outlined in my previous article located here
Step 23. Hit OK.
Step 24. Click on the Conditions tab.
Step 25. Select the "Wake this computer to run this task" checkbox.
Step 26. Hit OK to close the Create Task UI. You will be prompted for your password or the password you used to create the task.
Step 27. Now test your task.
Step 28. In the task Scheduler UI, click in Task Scheduler Library in the top left hand corner.
Step 29. Right-click on the task you just created and hit run. Your task should run silently in the background. After a few moments, you can click on the History tab and check the status of the task as it stands right now. You will either see running or completed successfully.
Though this task was built using Windows 7, the same steps apply to Windows Vista.