1. Home
  2. Windows

Use Task Scheduler To Tweak Automatic Disk Defragmentation In Windows 7/Vista

With Windows 7 / Vista many standard applications such as Windows Firewall got a face lift, the Disk Defragmenter interface changed to a dialog box with an added task scheduler support to schedule defragmentation of your hard drive. Since now it works on scheduled time, it automatically starts defragmenting as soon as the scheduled time is missed, which can cause disk thrashing and computer to slow down. Instead of letting Windows 7 /  Vista to decide when to start defragmentation you should decide when and how it should run.

The new Disk Defragmenter interface looks like this:


It offers only three options in Modify Schedule which are how often, what day and what time, that doesn’t give us more control over when and how it should be performed.


To fine tune disk defragmentation schedule open Task Scheduler, click Start and type Task Scheduler in the Search bar.


In Task manager application, navigate to the following:

Task Scheduler Library > Microsoft > Windows > Defrag

task manager defrag

How To Optimize

To start optimizing the schedule, double click on ScheduledDefrag, now click on the Triggers tab and double click on the Weekly trigger, which will open the Edit Trigger dialog box and allow you to edit the schedule.


Here you can change either to run defrag or to disable it completely. You can also control how it runs by using the Advanced settings, to start automatic disk defragmentation other than on scheduled time, click on the Begin the task drop down and make selection that best fits when you want to start defragmentation.

on a schedule

After you have made your changes on the Trigger tab, click OK.

How To Stop Unexpected Defragmentation

To stop disk thrashing at unexpected times, click on the Conditions tab.


From here you can control how to auto defrag at idle time (idle time denotes the time when there is no activity on the Computer). You can see the default three minutes of idle time is a little quick and will start defragmenting the drives when you are least expecting it. This is one of the reasons why you see disk activity at odd times.

How To Control Defragmentation Behavior

To control the behavior when the scheduled time is missed, click on the Settings tab.


This tab lets you decide when to run the task if the scheduled time was missed, if it failed to start, and when to stop it after a long period of time. After you have made your changes on the Settings tab, click OK.


  1. Hey, I use Diskeeper too. I wanted a good automatic defragger which also gives me graphics like the XP tool. Its awesome! Though I havent tried yet, I believe DK also defrags with less than 15% free space. I always ensure there is plenty of free space.

  2. @Hammer_of_Thor

    Thanks for sharing a little piece of information. We wanted to let our visitors know that few options are actually build-in and doesn’t need any software to be installed. Otherwise Diskeeper 2008 is a nice tool.

  3. Install Diskeeper 2008 if you want to defrag Vista with the minimum amount of fuss. It’s fast, powerful, and has more features than Vista’s crippled defrag. The best part about Diskeeper is that it is so easy to use- it has fully automatic, manual as well as scheduled defrag modes, and it takes just a few seconds to set these up. I’ve left my installation of Diskeeper on full auto so that it can defrag the drives without bugging me. Works perfectly.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.