Disable scheduled defrag and TRIM (ScheduledDefrag task): should you?

CleanProUndo: YesUpdated View as Markdown

Short answer

Updated

Windows runs a weekly task that defragments hard disks and sends TRIM to SSDs, and Storage Sense has its own cleanup task. This tweak disables both tasks until you switch it off again. It runs schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable and 1 more command.

In the app
Disable Scheduled DefragPRO
Command

schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /enableschtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable

What the switch writes. Your current value may differ. 1 more change below.

What it does

Windows runs a weekly task that defragments hard disks and sends TRIM to SSDs, and Storage Sense has its own cleanup task. This tweak disables both tasks until you switch it off again.

In the app the switch is called "Disable Scheduled Defrag", described there as: Turns off the scheduled defrag and TRIM task and the Storage Sense cleanup task until you switch this off.

When it helps, and when it hurts

When it helps

  • Keeping drive optimization from starting while you play, which matters most on hard disks.

When it hurts

  • An SSD that never receives a scheduled TRIM can slow down over months, and a hard disk fragments.
  • Run 'Optimize drives' by hand every few weeks if you keep this on.

What it writes

Exactly what the switch changes, read from the app's source. Switching it off is what the app writes when you turn the tweak off again.

With the tweak · CMD
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /disable
Switching it off · CMD
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /enable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /enable

From the app's source (sched_defrag_off.hpp), app 2.0.0, checked .

How to undo it

In the app: Yes

Switching it off sets a standard Windows value, which may not be exactly how you had it.

Switch the tweak off in Frozen Tweaks. It runs the commands shown under "Switching it off".

Changing several settings at once? The app's Make a restore point button, on every plan, makes a Windows restore point before you start.

Verdict

Use it only if you will run the optimization yourself. Moving the schedule to a quiet hour is easier.

Questions

What does the "Disable Scheduled Defrag" tweak change in Windows?
It runs schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable and 1 more command. The full list is in the table on this page, read from the app's source.
Is "Disable Scheduled Defrag" safe to switch on?
Use it only if you will run the optimization yourself. Moving the schedule to a quiet hour is easier. The main cost: An SSD that never receives a scheduled TRIM can slow down over months, and a hard disk fragments.
How do I undo it?
Switch the tweak off in Frozen Tweaks. Switching it off sets a standard Windows value, which may not be exactly how you had it.
Is "Disable Scheduled Defrag" free in Frozen Tweaks?
It is part of Frozen Pro and Elite. You can also make the change by hand with the values on this page.

In the app

Switch
Disable Scheduled Defrag
Category
Clean
Plan
Pro
Undo
Yes

See it in the catalog

More tweak explainers

Written by

Founder of Frozen Tweaks, based in Hamburg, Germany. Publishes settings guides for competitive games on his YouTube channel, Frost LIVE.

In the app

Category
Clean
Plan
Pro
Undo
Yes

See it in the catalog

Frozen Tweaks

Free for Windows 10 and 11

58 tweaks free, each with an undo switch. Never edits game files.

v2.0.0 · 6.4 MB · Windows 10 and 11, 64-bit · free account, no payment details

Or type frozentweaks.com on your PC.

The free Windows app for competitive games.

58 tweaks free, each with an undo switch. Never edits game files.

See all 177 tweaks

v2.0.0 · 6.4 MB · Windows 10 and 11, 64-bit · free account, no payment details

Frozen Tweaks runs on Windows. Send the link to your PC and download it there.

Or type frozentweaks.com on your PC.