Scheduling a process for later operation
You can set up a process as a batch process to run in the background at a scheduled time.
The at and smit commands let you enter the names of commands to be run at a later time and allow you to specify when the commands should be run.
root nick dee sarah
If the at.allow file exists, only users whose login names are listed in it can use the at command. A system administrator can explicitly stop a user from using the at command by listing the user's login name, in the at.deny file. If only the at.deny file exists, any user whose name does not appear in the file can use the at command.
- The at.allow file and the at.deny file do not exist (allows root user only).
- The at.allow file exists but the user's login name is not listed in it.
- The at.deny file exists and the user's login name is listed in it.
If the at.allow file does not exist and the at.deny file does not exist or is empty, only someone with root user authority can submit a job with the at command.
The at command syntax allows you to specify a date string, a time and day string, or an increment string for when you want the process to run. It also allows you to specify which shell or queue to use. The following examples show some typical uses of the command.
For example, if your
login name is
joyce and you have a script named
you want to run at midnight, do the following:
- Type the time you want the program to start running:
- Type the names of the programs to run, pressing Enter after
each name. After typing the surname, press the end-of-file character
(Ctrl-D) to signal the end of the list.
After you press Ctrl-D, the system displays information similar to the following:
job joyce.741502800.a at Fri Jul 6 00:00:00 CDT 2002.The program
WorkReportis given the job number
joyce.741502800.aand will run at midnight, July 6.
- To list the programs you have sent to be run later, type
The system displays information similar to the following:
joyce.741502800.a Fri Jul 6 00:00:00 CDT 2002
See the at command for the complete syntax.