10 replies
by parbo
by parbo
If you bring up an MS-DOS window on your computer and type at without any parameters, you will see a list of jobs that are currently in the queue for the computer on which you are currently running. You may see that there are no jobs scheduled in the list. If you have no jobs scheduled or you want to enter another job, use the at command to enter the jobs into the queue.
The syntax for the at command is:
at [\\computername] time [/interactive] [/every:date[,...] | /next:date[,...]] "command"The parameters are defined as follows:
\\computername
This parameter is used only if you want to schedule a command or program on another computer. If this parameter is eliminated, the job will be scheduled on the local computer you are using.
time
This is used to indicate what time the command or program must start. Use the 24-hour military clock notation, where 00:00 is midnight, 12:00 is noon, and 23:00 is 11:00 P.M.
/interactive
This parameter indicates that you would like the commandor program that executes to interact with the user logged into the computer where the scheduled job runs.
/every:date[,...]
This parameter is used to specify the frequency of the job for those jobs that must run repeatedly on specified days or dates.
?To specify a day, replace date with one of the days of the week, indicated with M, T, W, Th, F, S, or Su.
?To specify a date, replace date with one of the dates of the month, indicated with numbers 1, 2, 3 through 31.
If you have multiple days or dates, use a comma to separate them. If no day or date is specified, the current day is assumed.
by parbo
/next:date[,...]
This parameter is used to specify that you would like the command or program that is scheduled to execute on the next occurrence of the day or date. It will not repeat.
?To specify a day, replace date with one of the days of the week, indicated with M, T, W, Th, F, S, or Su.
?To specify a date, replace date with one of the dates of the month, indicated with numbers 1, 2, 3 through 31.
If you have multiple days or dates, use a comma to separate them. If no day or date is specified, the current day is assumed.
Note You use either the /every parameter or the /next parameter. They cannot be used together.
"command"
This parameter indicates what you want executed. It can be an NT command, a program with an extension of.EXE or .COM, or a batch program file with a .BAT or .CMD extension. You must provide the full, absolute pathname in this parameter, including the drive letter or the server and sharename if you are using a remote computer.
It isn't mandatory to use the quotation marks, but for consistency, ease of reading the command, and so that you don't have to worry about whether you have provided the exact syntax, it is recommended that you do use quotes. The exact rules on using the quotes or not are listed under the NT help for the at command.
Note The command parameter is where you indicate the name of the batch file that has the ntbackup command. You cannot put the ntbackup command directly on the command line for the at command. If you do, you will get errors when the system tries to execute the at command.
by parbo
While the at command syntax described earlier is used to schedule jobs in the queue, the following syntax is used to remove jobs from the queue.
The at command syntax is:
at [\\computername] [[id] [/delete [/yes]]
The parameters are defined as follows:
\\computername
This parameter is used only if you want to schedule a command or program on another computer. If this parameter is eliminated, the job will be scheduled on the local computer you are using.
id
Every job you submit has an identification number assigned to it. You can see what identification numbers are assigned to what jobs by entering the at command with no parameters, which lists all jobs in the queue and their associated identification numbers.
/delete
This parameter is used to cancel a scheduled job from the queue.
Warning If the id parameter is not provided and the /delete parameter is used, all scheduled jobs in the queue are canceled.
/yes
When deleting jobs from the queue, you will be prompted from the system. This parameter is used if you what to force a yes answer to all of these queries.
by klivermore
by klivermore
by brian.biby
All these responses are great, but you have to also make sure yoru clock is right and the SCHEDULE service is running on the machine you want the job scheduled on.
Also, when you are composing the command line, at least for batch or cmd files, you should specify the comspec too.
For instance the AT command line to run the cmd file c:\shutdownnow.cmd at 10pm today on the local machien would be (all on one line)
AT 22:00 /Interactive "cmd /c c:\shutdownnow.cmd"
The cmd file can contain whaterver command/lines/operations you desire, but it needs to be able to run unatttended.
by klivermore
by klivermore
This discussion is closed to new replies.
Trending Desktop posts
Sort by Trending