The translation is temporarily closed for contributions due to maintenance, please come back later.
English
Once finished, press kbd:[Ctrl + D] on an empty line to exit the prompt.
If the set of commands or the script tries to display information to standard output, the output is emailed to the user.
To view the list of pending jobs, use the [command]#atq# command. See xref:Automating_System_Tasks.adoc#s2-autotasks-at-batch-viewing[Viewing Pending Jobs] for more information.
You can also restrict the usage of the [command]#at# command. For more information, see xref:Automating_System_Tasks.adoc#s2-autotasks-at-batch-controlling-access[Controlling Access to At and Batch] for details.
Configuring a Batch Job
The [application]*Batch* application executes the defined one-time tasks when the system load average decreases below 0.8.
To define a Batch job, do the following:
On the command line, type the command [command]#batch#.
In the displayed `at>` prompt, define the job commands:
Type the command the job should execute and press kbd:[Enter]. Optionally, repeat the step to provide multiple commands.
Enter a shell script at the prompt and press kbd:[Enter] after each line in the script.
If a script is entered, the job uses the shell set in the user's `SHELL` environment, the user's login shell, or [command]#/bin/sh# (whichever is found first).
Once finished, press kbd:[Ctrl + D] on an empty line to exit the prompt.
If the set of commands or the script tries to display information to standard output, the output is emailed to the user.
To view the list of pending jobs, use the [command]#atq# command. See xref:Automating_System_Tasks.adoc#s2-autotasks-at-batch-viewing[Viewing Pending Jobs] for more information.
You can also restrict the usage of the [command]#batch# command. For more information, see xref:Automating_System_Tasks.adoc#s2-autotasks-at-batch-controlling-access[Controlling Access to At and Batch] for details.
Viewing Pending Jobs
To view the pending [command]#At# and [command]#Batch# jobs, run the [command]#atq# command. The [command]#atq# command displays a list of pending jobs, with each job on a separate line. Each line follows the job number, date, hour, job class, and user name format. Users can only view their own jobs. If the `root` user executes the [command]#atq# command, all jobs for all users are displayed.
Additional Command Line Options
Additional command line options for [command]#at# and [command]#batch# include the following: