Chapter 34. Automated Tasks320• MMDDYY, MM/DD/YY, or MM.DD.YY formats — For example, 011502 for the 15th day of Januaryin the year 2002.• now + time — time is in minutes, hours, days, or weeks. For example, now + 5 days specifies thatthe 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 timeformat, read the /usr/share/doc/at-/timespec text file.After typing the at command with the time argument, the at> prompt is displayed. Type the commandto execute, press Enter, and type Ctrl+D. Multiple commands can be specified by typing eachcommand followed by the Enter key. After typing all the commands, press Enter to go to a blankline and type Ctrl+D. Alternatively, a shell script can be entered at the prompt, pressing Enter aftereach line in the script, and typing Ctrl+D on a blank line to exit. If a script is entered, the shell used isthe shell set in the user's SHELL environment, the user's login shell, or /bin/sh (whichever is foundfirst).If the set of commands or script tries to display information to standard out, the output is emailed to theuser.Use the command atq to view pending jobs. Refer to Section 34.2.3, “Viewing Pending Jobs” for moreinformation.Usage of the at command can be restricted. For more information, refer to Section 34.2.5, “ControllingAccess to At and Batch” for details.34.2.2. Configuring Batch JobsTo 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, pressEnter, and type Ctrl+D. Multiple commands can be specified by typing each command followed bythe 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 theuser's SHELL environment, the user's login shell, or /bin/sh (whichever is found first). As soon asthe 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 theuser.Use the command atq to view pending jobs. Refer to Section 34.2.3, “Viewing Pending Jobs” for moreinformation.Usage of the batch command can be restricted. For more information, refer to Section 34.2.5,“Controlling Access to At and Batch” for details.34.2.3. Viewing Pending JobsTo view pending at and batch jobs, use the atq command. The atq command displays a list ofpending jobs, with each job on a line. Each line follows the job number, date, hour, job class, andusername format. Users can only view their own jobs. If the root user executes the atq command, alljobs for all users are displayed.