Disk Cleanup scheduled task

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following command line the disk cleanup tool in Scheduled
Tasks: "c:\windows\system32\cleanmgr /d c: /sagerun:1". Is there anyway to
set this so that it creates an entry in Event Viewer when it's done? Or is
there already some type of log file that is automatically created whenever
Disk Cleanup is run? I am concerned that it is not actually running, as when
I am logged off of the system, there is no visible sign that the process
started at all.
 
Open up your Scheduled Tasks folder. On the toolbar, under
Advanced, click on View log. Scroll down to [ ***** Most recent
entry is above this line ***** ] and begin searching for your
clean up task.
 
You also might want to take a look at the command you're using.
You don't have to include the /d switch. If you ran /sageset
correctly, the drive has already been set. Your command should
look like this:

C:\windows\system32\cleanmgr /sagerun:1

Take a look here under More Information at the Note: for /d
switch:

http://support.microsoft.com/?kbid=315246

I think that you will find that your tasks is running as
scheduled, it's just not doing what you expect it to do.
 
Candace said:
I am using the following command line the disk cleanup tool in Scheduled
Tasks: "c:\windows\system32\cleanmgr /d c: /sagerun:1". Is there anyway to
set this so that it creates an entry in Event Viewer when it's done? Or is
there already some type of log file that is automatically created whenever
Disk Cleanup is run? I am concerned that it is not actually running, as when
I am logged off of the system, there is no visible sign that the process
started at all.
Hi

Let your scheduled task start a batch file instead where you use
Eventcreate.exe to create a message before and after the launch of
cleanmgr.exe. You might need to use START /WAIT for the cleanmgr.exe
command.

Something like this:

--------------------8<----------------------
Eventcreate.exe <some parameters here writing start info>
start /wait cleanmgr.exe /sagerun:1
Eventcreate.exe <some parameters here writing stop info>

--------------------8<----------------------


Run Eventcreate.exe /? in a command prompt for help.
 
Back
Top