Disable scheduled defrag and TRIM (ScheduledDefrag task): should you?
Short answer
UpdatedWindows 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.
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /enableschtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable
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.
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /disableschtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /enable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /enableFrom 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
Related guides
- Windows 11 Gaming Optimization: What Still Works in 2026An honest audit of Windows 11 gaming tweaks: which settings still measurably help in 2026, which are placebo, and which quietly cost you security.8 min read
- What Is Safe to Delete on a Gaming PC, and What to Leave AloneTemporary files, update leftovers, crash dumps and caches can go. Shader caches cost you stutter once. Here is the list, and what a cleaner should never touch.4 min read
More tweak explainers
- NTFS last access and 8.3 namesNTFS can record when each file was last read and keep a short DOS-style name (PROGRA~1) for every file. What it changes, when it hurts, and how to undo it.3 min read
- EnablePrefetcher and EnableSuperfetchPrefetch records what a program loads when it starts so the next start is faster, and Superfetch preloads what you use often.2 min read
- Distributed Link Tracking Client (TrkWks)TrkWks keeps shortcuts and links working when the file they point to is moved to another NTFS drive or computer in a domain. What it changes and how to undo it.2 min read
In the app
- Category
- Clean
- Plan
- Pro
- Undo
- Yes
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.
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.
