Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Disk Cleanup scheduled task

0 views
Skip to first unread message

Nepatsfan

unread,
Mar 10, 2005, 9:50:26 AM3/10/05
to
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.

--
Nepatsfan
"Candace" <Can...@discussions.microsoft.com> wrote in message
news:A7787864-8DC6-4277...@microsoft.com...
>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.


Nepatsfan

unread,
Mar 10, 2005, 10:16:14 AM3/10/05
to
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.

Torgeir Bakken (MVP)

unread,
Mar 10, 2005, 3:11:48 PM3/10/05
to
Candace wrote:

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


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

0 new messages