Use the Linux at command to allow Win2000 to perform operations on a regular basis

Source: Internet
Author: User

In Win2000, a common method for system scheduled operations is to use the Linux at command after the scheduling service is started, you can also use the command line method "net start schedule" in MMC ".

The Linux at command is used as follows:

The Linux at command is scheduled to run commands and programs on a specific date and time.

To use the Linux at command, the scheduler service must be running.

AT [\ computername] [[id] [/DELETE] |/DELETE [/YES]

AT [\ computername] time [/INTERACTIVE]

[/EVERY: date [,...] |/NEXT: date [,...] "command"

\ Computername specifies the remote computer. If this parameter is omitted, the system plans to run the Linux at command on the local computer.

Id: id of the scheduled command.

/Delete: delete a scheduled Linux at command. If the id is omitted, all scheduled Linux at commands on the computer will be deleted.

/Yes is used together with the Linux at command for deleting all jobs without further confirmation.

Time specifies the time when the Linux at command is run.

/Interactive allows a job to interact with the user desktop that was logged on at runtime.

/Every: date [,...] Run the Linux at command on the specified date every month or every week.

If the date is omitted, the task runs on the current day of each month by default.

/Next: date [,...] specifies to run the Linux at command on the next specified date (for example, next Thursday.

If the date is omitted, the task runs on the current day of each month by default.

"Command" is the Windows NT command or batch processing program to be run.

Usage 1: regularly enable or disable a service. Use the RAS service provider as an example to enable the Service at every day. The Linux at command is as follows:

AT 19:00/every: M, T, W, Th, F, S, Su net start "remote access server ″

AT 7: 30/every: M, T, W, Th, F, S, Su net stop "remote access server ″

Usage 2: shutdown a Linux at command at a specified time

1. Compile a batch file (the reason for using the batch file is to make more flexible control in the future without re-establishing scheduling). The content is as follows:

Shutdown/l

Use

Shutdown/r

The file is stored as c: \ autoshut. bat.

2. Create an automatic execution entry:

At 22:00 c: \ autoshut. bat

In this way, the Linux at command will automatically shut down at every night, and a 30-second prompt will be sent before the command is shut down, countdown.

The shutdown program used in this article is self-contained in the Rkit of win2k, And the chinaasp website seems to have been downloaded, which is very useful.

This is another usage of this program:

Shutdown [\ computername] [/l] [/a] [/r] [/t: xx] ["msg"] [/y] [/c] [/?]

Where:

\ Computername

Remote computer to shut down. If no name is given but the tool is started with any of the other

Options, the local computer name will be used.

/L

Specifies a local shutdown.

/

Quits a system shutdown. This can only be done during the timeout period. If this switch is used,

All others are ignored.

/R

Restart the computer specifed after shutdown.

/T: xx

Sets the timer for system shutdown in xx seconds. The default is 20 seconds.

"Msg"

Specifies an additional message with a maximum of 127 characters, surrounded by quotation marks.

/Y

Answers questions with "yes ".

/C

Forces running applications to close.

Caution

If you use the/c parameter, Windows 2000 ignores the application's option to save data that

Might have changed. You will see no File Save dialog box, because Windows 2000 will force

Application to close. This will result in a loss of all data not previusly saved.

/? (Or shutdown without parameters)

Display help.

Examples

Shutdown and reboot a remote computer.

Shutdown \ IMAREMOTECOMPUTER/R

Shutdown a local computer, closing all applications in 5 seconds.

Shutdown/L/C/T: 5

PS: shutdown program: http://www.pkufo.com/computer/openfile.asp? Id = 65

The above commands allow Win2000 to perform operations on a regular basis using the Linux at command.

  1. Linux at command details and Use Cases
  2. Use the Linux at command in the Linux operating system to regularly send emails
  3. Usage of cron and linux at commands in linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.