The at command allows you to specify a specific date and time to run a program. For example, I can start playing music on my CDROM at seven o'clock every morning:
At 7: 00
Cdplay <Ctrl> <D>
In the preceding example, enter "at" in the command line and press Enter. Next, the AT command displays a "at>" prompt. Then, I enter "cdplay" and press Enter. Finally, I hold down <Ctrl> and <D> at the same time to end the input. If I press enter and another "at>" prompt appears, I can enter the programs that I want to run at seven o'clock. Then, enter <Ctrl> <D>. <Ctrl> <D> it is like sending an end match to the current input, indicating that the input is complete. Do not press <Ctrl> <D> twice in a row. Otherwise, the system automatically exits.
You can use the following command to list the current tasks in the task scheduling table:
At-l
You can see the list of programs that are still waiting in the task scheduling table.
If you change your mind, you must delete a program from the task scheduling table. Example:
Atrm 8
This command will delete the program with the command number 8 from the task scheduling table
You can also schedule a program to run at a later time, for example:
At 12/31/00
Startx
This command will start my X-Windows System on the new millennium night (December 31, 2000, 5 minutes before midnight ).
If you cannot run the AT command, check whether the task scheduling service program (ATD) has been loaded (you can use the root user to run ntsysv to load ). If the AT command is valid for the root user but does not work for common users, check whether the file/etc/at. deny exists and check whether the file/etc/at. allow does not exist. This is the default setting for all users to run the AT command. If you want to run the AT command only for the specified user, you can generate the file/etc/at. allow and add the user list to the file.
For other options of the AT command, run
Man
If you want to run a "processor hunger" task in the background when the system load is low, you can use the batch command. For example, I can run setiathome (a data analysis program to help find external Smart Life, SETI ):
Batch
At> setiathome <Ctrl> <D>
In the above example, I enter batch in the command line and press Enter. At> command prompt, I enter the name of the program to be run in the background. The program tries to run immediately, but it does not run until the system load is less than 0.8. You can check the system load by checking the Virtual File/proc/loadavg:
CAT/proc/loadavg
After the batch command is complete, the output result will be sent to my mailbox by email.