NanoTech-kw · Tech Guide Library

How to Automate Disk Cleanup

Microsoft · Windows 11 Setup

Windows 11 guide: How to Automate Disk Cleanup. Reference documentation with steps and details.

Step-by-step

  1. Step 2: Launch the Task Calendar One of the built-in Windows tools called Task Scheduler lets you automate several system activities, including Disk Cleanup. Launch the Task Scheduler: Open the application by typing "Task Scheduler" into the Windows search box. Make a New Assignment: Choose "Create Basic Task" from the Actions pane on the right side of the Task Scheduler window.
  2. Step 3: Assemble the Work A wizard will now walk you through setting up the automated Disk Cleanup operation. Give Your Task a Name: Then select "Next." Name your job something like "Automated Disk Cleanup." Select a Trigger: You must select the frequency at which Disk Cleanup will operate. Daily, weekly, monthly, or whenever your machine boots up are among the options. Weekly or monthly scheduling is usually a decent option for a regular chore like disk cleanup. After choosing your preferred frequency, press "Next." Decide on the date and time: Indicate the time you'd like the task to begin. You could program it to run every Monday at 3:00 PM, for instance. When finished, click "Next".
  3. Step 4: Select an Action This step involves instructing Task Scheduler on what to do, which is to launch the Disk Cleanup utility. Choose "Start a Program": Select "Start a Program" from the Action stage of the wizard, then click "Next." Select Disk Cleanup from the Program menu: To launch Disk Cleanup, enter the following command in the "Program/script" field: Optional: Add parameters: You can add more parameters, such as the following, to tell Disk Cleanup which drive to target and what kinds of files to look for. The /sagerun:1 argument runs a preset cleanup defined in Disk Cleanup. You must first define this preset manually in Disk Cleanup using the command. cleanmgr.exe /sageset:1.
  4. Step 5: Examine and Complete Check the summary of your task settings, which includes the trigger, action, and time settings, once you've configured the job. After everything is in order, select "Finish." Now that your job has been established, Windows will carry out Disk Cleanup automatically according to the schedule you provided.
  5. Step 6: Check the Assignment You can manually test your task by starting it right away to make sure everything goes as planned. Find the Task: To locate the task you just created in Task Scheduler, click on "Task Scheduler Library." Run the Task: "Run" can be selected by right-clicking on the job in order to start it right away. By doing this, you can make sure that the Disk Cleanup operates correctly with the parameters you specify.

Reference: www.geeksforgeeks.org

Open in the NanoTech-kw library →