Discussion Locked

Schelduling a defrag

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
This is going to sound crazy but I want to scheldule a defrag on my XP Pro machine to run every couple of days. I can't seem be able to set it and disk cleanup to run automatically. I can get disk cleanup to run, but it waits for a click on OK and YES before it will finish. I would like both to run automatically. HELP!!!!

5 replies

by dmiles

To schedule a new task

1. Open Scheduled Tasks.
2. Double-click Add Scheduled Task.
3. Follow the instructions in the Scheduled Task Wizard.

Also set the AT service account to be sure it runs.

You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.

1. Open Scheduled Tasks.
2. On the Advanced menu, click AT Service Account.
3. Click This Account, and then type the user account that will run tasks scheduled by using the at command.
4. In Password and Confirm Password, type the correct password for the account.

by eric.cone

First you need to run the Cleanup Manager manually to create a registry entry containing the options you wish to execute.

From the command shell (cmd.exe) run:
cleanmgr /sageset:1

Then create a batch file containing the following commands:
start /wait cleanmgr /sagerun:1
start /wait defrag c:

Finally, go to scheduled tasks in control panel and set this batch file to run automatically on the schedule you desire.

Regards,
Eric K. Cone

This discussion is closed to new replies.