Disk Cleanup scheduled task

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

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

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

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

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

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.


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

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

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