at (可以计划要在指定的时间和日期执行的任务)

小猪老师 发表于 2020-06-29 11:21
浏览次数:
在手机上阅读

使用at命令,用户可以计划要在指定的时间和日期执行的任务。

查看英文版

目录

1 at 运行系统环境

2 at 语法

3 at 示例

at 运行系统环境

Windows xp

Windows 2000

Windows NT

at 语法

AT命令安排命令和程序在指定的时间和日期在计算机上运行。

计划服务必须运行才能使用AT命令。

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command"
\\computername 指定远程计算机。 如果省略此参数,则在本地计算机上调度命令。
id 是分配给计划命令的标识号。
/delete 取消计划的命令。如果省略id,则将取消计算机上所有计划的命令。
/yes 当不需要进一步确认时,与“取消所有作业”命令一起使用。
time 指定命令运行的时间。
/interactive 允许作业与运行作业时登录的用户的桌面进行交互。
/every:date[,...] 在一周或一个月的每个指定日期运行命令。如果省略日期,则假定该月的当前日期。
/next:date[,...] 在一天的下一个出现时间(例如,下星期四)运行指定的命令。如果省略日期,则假定该月的当前日期。
"command" 是Windows NT命令还是要运行的批处理程序。

The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

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

查看英文版

查看中文版

at 示例

at 6:50PM "c:\winnt\task.bat"

执行此命令将在今天下午6:50运行task.bat文件,除非在指定时间后计划了任务。因为/ interactive开关不在命令中,所以此批处理文件将在后台执行。

at 6:50PM /interactive c:\winnt\beep.bat

在下午6:50运行beep.bat批处理文件,用户可以与该批处理文件进行交互。

at 1 /delete

删除ID为1的at。

at /delete /yes

删除所有AT ID。

at

单独键入显示每个计划任务,它们的状态,ID,计划时间和命令。

at 1

键入后跟一个ID号会显示有关任务ID的其他信息,如下所示。

Task ID: 5 Status: OK Schedule: Today, Time of day: 6:55 PM Interactive: No Command: c:\winnt\task.bat
at 6:50PM "c:\winnt\task.bat"

Performing this command would run the task.bat file at 6:50PM today unless the task is scheduled after the time specified. Because the /interactive switch is not in the command, this batch file will be executed in the background.

at 6:50PM /interactive c:\winnt\beep.bat

Runs the beep.bat batch file at 6:50PM with the ability for the user to interact with the batch file.

at 1 /delete

Deletes the at ID 1.

at /delete /yes

Delete all AT IDs.

at

Typing at alone displays each of the scheduled tasks, their status, id, scheduled time, and command.

at 1

Typing at followed by an ID number displays additional information about the task id as shown below.

Task ID: 5 Status: OK Schedule: Today, Time of day: 6:55 PM Interactive: No Command: c:\winnt\task.bat

查看英文版

查看中文版

其他命令行

ansi.sys | append | arp | assign | atmadm | attrib | assoc |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条