ChkDsk & Defrag as Scheduled Tasks

B

Bob Day

Right click on Local C Drive, Tools Tab, you have Error Checking - Check
Now, Deframentation and Back Up.

For an unattended Windows XP Pro system, I would like to run Error Checking
and Deframentation via control panel, Schedule Tasks on a regular basis.

Is the best was to do this to schedule to run the c:\windows\system32\chkdsk
and defrag DOS programs (with proper command line options)? Even in DOS
6.22 ScanDisk replaced chkdsk.

I have successfully created scheduled tasks that run both of these, but they
are clearly DOS and I am not sure they are the equivalent of what runs under
the Tools tab mentioned above (which runs as a windows GUI, not DOS).

Here are my questions:
1) Running c:\windows\system32\ChkDsk C: /F as a scheduled task at 12:01AM
does not really work, since it will come back say some file is in use, do
you want to schedule it for reboot Y/N? Since the machine is unattended,
nothing would happen.
On an NTFS drive, is it even a good idea to run chkdsk on a scheduled basis?
Doesn't NTFS (or maybe it is XP) force you to run chkdsk automatically at
reboot if it detects a problem that would warrant it being run? If it is
wise to run it regularly via schedule tasks, how would I do it to avoid any
questions that require user input?

2) c:\windows\system32\defrag C: as a scheduled task seems to run fine as a
DOS program, but does not look the same as what runs under the tools tab
above (a windows GUI). Is there a way to run it as a scheduled task with a
windows GUI?

3) What happens if two scheduled tasks overlap? Lets say task A starts at
10 and task B starts at 10:01. Is scheduled tasks smart enough to finish A
before it starts B, or will both run in a multitasking fashion (which would
not be good if task A was Defrag).

Thanks for your help

Bob Day
 
V

Vivien Wu [MSFT]

Hello,

1. In Windows XP, when the file system finds the volume to be in a "dirty"
state, chkdsk will try to check disk at startup.

If you want to schedule chkdisk when the computer restarts, you can use the
command "echo y| chkdsk c: /f". For detailed information, check the article
below.

197527 How to Automate Chkdsk
http://support.microsoft.com/?id=197527

2. The Disk Defragmenter GUI tool cannot be scheduled. We need to use the
Defrag.exe command line tool to schedule disk defragmentation.

For detailed information, check the article below.

314848 How to Defragment Your Disk Drive Volumes in Windows XP
http://support.microsoft.com/?id=314848

3. The system will launch the task at the scheduled time. So, the system
will not check if the first task completes if two scheduled tasks overlap.

Thanks.

--------------------
| From: "Bob Day" <[email protected]>
| Subject: ChkDsk & Defrag as Scheduled Tasks
| Date: Wed, 6 Aug 2003 17:58:43 -0500
| Newsgroups: microsoft.public.windowsxp.customize
|
| Right click on Local C Drive, Tools Tab, you have Error Checking - Check
| Now, Deframentation and Back Up.
|
| For an unattended Windows XP Pro system, I would like to run Error
Checking
| and Deframentation via control panel, Schedule Tasks on a regular basis.
|
| Is the best was to do this to schedule to run the
c:\windows\system32\chkdsk
| and defrag DOS programs (with proper command line options)? Even in DOS
| 6.22 ScanDisk replaced chkdsk.
|
| I have successfully created scheduled tasks that run both of these, but
they
| are clearly DOS and I am not sure they are the equivalent of what runs
under
| the Tools tab mentioned above (which runs as a windows GUI, not DOS).
|
| Here are my questions:
| 1) Running c:\windows\system32\ChkDsk C: /F as a scheduled task at 12:01AM
| does not really work, since it will come back say some file is in use, do
| you want to schedule it for reboot Y/N? Since the machine is unattended,
| nothing would happen.
| On an NTFS drive, is it even a good idea to run chkdsk on a scheduled
basis?
| Doesn't NTFS (or maybe it is XP) force you to run chkdsk automatically at
| reboot if it detects a problem that would warrant it being run? If it is
| wise to run it regularly via schedule tasks, how would I do it to avoid
any
| questions that require user input?
|
| 2) c:\windows\system32\defrag C: as a scheduled task seems to run fine
as a
| DOS program, but does not look the same as what runs under the tools tab
| above (a windows GUI). Is there a way to run it as a scheduled task with
a
| windows GUI?
|
| 3) What happens if two scheduled tasks overlap? Lets say task A starts
at
| 10 and task B starts at 10:01. Is scheduled tasks smart enough to finish
A
| before it starts B, or will both run in a multitasking fashion (which
would
| not be good if task A was Defrag).
|
| Thanks for your help
|
| Bob Day
|
|
|

Sincerely,

Vivien Wu
MCSA, MCSE2000 and MCDBA2000
Microsoft Partner Online Support


Get Secure! - www.microsoft.com/security

====================================================
When responding to posts, please Reply to Group via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided AS IS with no warranties, and confers no rights.
 

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

Windows XP Cancelling chkdsk 1
XP Defrag won't run, scheduled chkdsk 1
Running chkdsk from Scheduled task? 1
Windows XP Unable to Defrag 1
Scheduled Tasks Not Running 3
Scheduled Tasks 5
Scheduled Tasks - password problem 4
Can't run defrag or Chkdsk in XP 8

Top