Configuring Batch Jobs; Viewing Pending Jobs - Red Hat ENTERPRISE LINUX 4 System Administration Manual

Hide thumbs Also See for ENTERPRISE LINUX 4:
Table of Contents

Advertisement

Chapter 34. Automated Tasks
• MMDDYY, MM/DD/YY, or MM.DD.YY formats — For example, 011502 for the 15th day of January
in the year 2002.
• now + time — time is in minutes, hours, days, or weeks. For example, now + 5 days specifies that
the command should be executed at the same time five days from now.
The time must be specified first, followed by the optional date. For more information about the time
format, read the /usr/share/doc/at-<version>/timespec text file.
After typing the at command with the time argument, the at> prompt is displayed. Type the command
to execute, press Enter, and type Ctrl+D. Multiple commands can be specified by typing each
command followed by the Enter key. After typing all the commands, press Enter to go to a blank
line and type Ctrl+D. Alternatively, a shell script can be entered at the prompt, pressing Enter after
each line in the script, and typing Ctrl+D on a blank line to exit. If a script is entered, the shell used is
the shell set in the user's SHELL environment, the user's login shell, or /bin/sh (whichever is found
first).
If the set of commands or script tries to display information to standard out, the output is emailed to the
user.
Use the command atq to view pending jobs. Refer to
information.
Usage of the at command can be restricted. For more information, refer to
Access to At and Batch"

34.2.2. Configuring Batch Jobs

To execute a one-time task when the load average is below 0.8, use the batch command.
After typing the batch command, the at> prompt is displayed. Type the command to execute, press
Enter, and type Ctrl+D. Multiple commands can be specified by typing each command followed by
the Enter key. After typing all the commands, press Enter to go to a blank line and type Ctrl+D.
Alternatively, a shell script can be entered at the prompt, pressing Enter after each line in the script,
and typing Ctrl+D on a blank line to exit. If a script is entered, the shell used is the shell set in the
user's SHELL environment, the user's login shell, or /bin/sh (whichever is found first). As soon as
the load average is below 0.8, the set of commands or script is executed.
If the set of commands or script tries to display information to standard out, the output is emailed to the
user.
Use the command atq to view pending jobs. Refer to
information.
Usage of the batch command can be restricted. For more information, refer to
"Controlling Access to At and Batch"

34.2.3. Viewing Pending Jobs

To view pending at and batch jobs, use the atq command. The atq command displays a list of
pending jobs, with each job on a line. Each line follows the job number, date, hour, job class, and
username format. Users can only view their own jobs. If the root user executes the atq command, all
jobs for all users are displayed.
320
for details.
for details.
Section 34.2.3, "Viewing Pending Jobs"
Section 34.2.5, "Controlling
Section 34.2.3, "Viewing Pending Jobs"
for more
for more
Section 34.2.5,

Advertisement

Table of Contents
loading

Table of Contents