Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Windows Operating Systems and Software > Tips, Tricks & Tutorials

Reply
 
LinkBack Thread Tools Display Modes
Old 06-10-2003, 12:00 AM   #1 (permalink)
Super Techie
 
Join Date: May 2003
Posts: 469
Default Scheduling Defrag via the Command Prompt

In the above , I showed how to defrag from the command prompt, but how about scheduling a defrag? Well, it's just as simple and requires no batch file.

Open the command prompt START==>All Programs==>Accessories==>Command Prompt

Now type at /? then enter and were presented with these options:


AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.



I want to defrag my hard drive c: on Monday, Wednesday, and Friday at 11 p.m. and keep it interactive. (allows visual progress).

C:\>at 23:00 /interactive /every:M,W,F defrag c:



....and I'm presented with:


C:\Documents and Settings\XPUSER>at 23:00 /interactive /every:M,W,F defrag c:
Added a new job with job ID = 1



To list your scheduled jobs, just type at at the prompt, then enter:

C:\Documents and Settings\Rock.MICHAELB1>at
Status ID Day Time Command Line
------------------------------------------------------------------
1 Each M W F 11:00 PM defrag c:


To delete pending jobs, just follow the syntax:

/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.



So to cancel my job with ID 1:

at 1 /delete
__________________
Death has a thousand doors, let's see which one our victim chose.

"There's one thing that you learn on this job, is that human beings are capable of anything"

If you chase two rabbits, you lose them both

You say tomato... I say cause of death
For sale/trade
http://www.tech-forums.net/pc/f40/fu...r-fs-t-139695/
microsoftne is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:33 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0