---
title: "Disable scheduled defrag and TRIM (ScheduledDefrag task): should you?"
description: "Windows runs a weekly task that defragments hard disks and sends TRIM to SSDs, and Storage Sense has its own cleanup task. What it changes and how to undo it."
url: https://frozentweaks.com/tweaks/disable-scheduled-defrag-and-trim
author: Frost LIVE, Founder of Frozen Tweaks
published: 2026-10-08
updated: 2026-10-08
category: "Clean"
source: Frozen Tweaks (https://frozentweaks.com)
---

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

**Short answer:** 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

- Switch: Disable Scheduled Defrag (Clean, Pro, Advanced)
- Undo: Yes. Switching it off sets a standard Windows value, which may not be exactly how you had it.
- Catalog row: https://frozentweaks.com/tweaks#t-1128

## 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

- 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

Read from the app's source. "Switching it off" is what the app writes when you turn the tweak off again.

Commands the tweak runs:

```bat
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /disable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /disable
```

Switching it off runs:

```bat
schtasks /change /tn "\Microsoft\Windows\Defrag\ScheduledDefrag" /enable
schtasks /change /tn "\Microsoft\Windows\DiskCleanup\SilentCleanup" /enable
```

Source: Tweaks/sched_defrag_off.hpp in the app's source, app 2.0.0, checked 2026-10-08.

## How to undo it

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

## 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.

## Related guides

- [Windows 11 Gaming Optimization: What Still Works in 2026](https://frozentweaks.com/guides/windows-11-gaming-optimization)
- [What Is Safe to Delete on a Gaming PC, and What to Leave Alone](https://frozentweaks.com/guides/what-to-delete-on-a-gaming-pc)

## More tweak explainers

- [NTFS last access and 8.3 names](https://frozentweaks.com/tweaks/ntfs-last-access-and-8dot3-names)
- [EnablePrefetcher and EnableSuperfetch](https://frozentweaks.com/tweaks/enableprefetcher-and-enablesuperfetch)
- [Distributed Link Tracking Client (TrkWks)](https://frozentweaks.com/tweaks/disable-distributed-link-tracking)

---
Written by Frost LIVE, founder of Frozen Tweaks. Canonical version: https://frozentweaks.com/tweaks/disable-scheduled-defrag-and-trim
