Scheduling tasks

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

Guest

Hello:

I'm confused on how to automate disk defrag & disk clean up with task
scheduler.

For example, when I schedule defrag, do I need to add the C: extension to
let scheduler know to defrag C drive? When I leave it as
C:\Windows\System32\defrag.exe, the screen just flashes when its time to
defrag & nothing happens. But, when I add C: it seems to defrag fine. Some
microsoft articles do not say anything about adding the C: extension. And,
why when it automatically defrags, I don't see the regular defrag interface
screen. Its a different interface. A black screen that tells me at the top
some stats about drive c.

As far as disk cleanup, are there any extensions that I have to add similiar
to above?

John
 
There are two defrag tools in XP.

dfrg.msc is the pretty one that opens from
Start\All Programs\Accessories\System Tools.

defrag.exe the command line tool that runs in the command prompt.
defrag.exe is the one that you can schedule.

Append the drive letter for the drive you wish to defragment to the command
in the Run text box. In a default installation, your Run command will look
like this:
C:\WINDOWS\SYSTEM32\defrag.exe C:

How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;555098

Disk Cleanup is a waste of time. But here ya are...

Description of the Disk Cleanup Tool in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;310312

How to Automate the Disk Cleanup Tool in Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;315246

Better deal...

I have Disk Cleaner set to run quiet at startup. Runs for 10 seconds or so
and exits. I also like the fact that, after you set it up, it cleans all
the following with one click (and/or automatically at boot). Makes XP's
Disk Cleanup look like a piker. XP's Disk Cleanup will *not* clean
Content.IE5.

Disk Cleaner will Clean:
Temporary Internet Files {Including the contents of the Content.IE5 folder}
Internet Cookies
Internet History
System Temporary Folder
Recent Documents
Run... Dialog List
Find Document List
Find Computer List
URLs in IE Address Bar
URLs in Shell Address Bar
Media Player Recent URLs
WinZip Recent Files
WinZip Extract To Folders
Paint Recent Files
WordPad Recent Files
Cleans Recycle Bin (what else?)
Opera Cache
Opera Cookies
Opera History
Opera Visited links
Opera Download History and Download folder
Firefox Cache
Firefox Cookies
Firefox History

Disk Cleaner
http://www.xs4all.nl/~mp2004/

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Hi wesley & any others:

Thank you for your response. Just curious why defrag doesn't work without
appending the C: extension? The default on my system if I use
Start>Programs>Accessorries>System Tools is defrag.exe. I had a Dell tech
tell me not to add the C: extension as task scheduler would know to defrag C
drive.

As far as disk cleanup that comes with Windows XP is concerned, when I do
schedule it & it runs, it still prompts me to click ok to delete the files.
Is this normal?

And that you for the other disk cleanup tool you advised.

Sincerely,

John
 
Hello Wesley & any others:

Just curious why Defrag doesn't run without appending the C: extension. I
had a Dell tech tell me not to add the extension since task scheduler would
know to defrag C drive. When I open Programs>Accessories>System Tools my
default is defrag.exe.

As far as running disk cleanup from Windows, when it comes time for cleanup
to run, it still prompts me to click ok to delete the files. Is this normal?

And thank you for the disck cleanup tool you recommended.

Sincerely,

John
 
John,

If you don't tell defrag.exe which drive to defrag how will it know?

C:\>Defrag /?
Usage:
Defrag <volume> [-a] [-f] [-v] [-?]
volume drive letter or mount point (d: or d:\vol\mountpoint)
-a Analyze only
-f Force defragmentation even if free space is low
-v Verbose output
-? Display this help text

Start\Programs\Accessories\System Tools\ the default should be dfrg.msc.
Dfrg.msc is Disk Defragmenter and opens with that name and a GUI (Graphical
User Interface). Defrag.exe is Disk Defragmenter Module and does not open a
GUI. Defrag.exe can only be run from a command prompt. If you try to run it
from Start | Run or by clicking on Defrag.exe in C:\WINDOWS\system32, it
will just flash a command prompt window and not run.

Not if you use cleanmgr /sageset:99 & cleanmgr /sagerun:99 with Disk
Cleanup (cleanmgr.exe). See ...
http://www.langa.com/newsletters/2002/2002-04-04.htm

See ...
2) CleanAll Updated
3) Basic Cleanup: All Versions Of Windows
4) Advanced Cleanup Batch File For Win9X
5) Advanced Cleanup: Other Versions Of Windows
6) Sageset Unlocks CleanMgr's Power
7) SageRun Completes the Picture
8) Cleaning the Temporary File Areas
9) Extending The Commands
10) Now Add SageRun
11) Batch It Up
12) Download A CleanXP Template

Way back I spent a lot of time setting up a cleanr.bat for cleanmgr.exe,
waste of time.

Disk Cleaner is a way better program, it cleans more.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
When you set scheduled task to run. Will that run if no one is logged in, it
the pc is left at the "press alt+cltr+del" screen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scheduling a defrag 5
Scheduled Maintenance Tasks? 2
disk defrag message 1
Defrag 3
Defrag Automatic 5
Can't run defrag or Chkdsk in XP 8
can't run defrag because chkdsk is scheduled to run on C:/ 3
disk defrag 2

Back
Top