|
Packit |
081926 |
.TH AT 1 2009-11-14
|
|
Packit |
081926 |
.SH NAME
|
|
Packit |
081926 |
at, batch, atq, atrm \- queue, examine or delete jobs for later execution
|
|
Packit |
081926 |
.SH SYNOPSIS
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
.RB [ -V ]
|
|
Packit |
081926 |
.RB [ -q
|
|
Packit |
081926 |
.IR queue ]
|
|
Packit |
081926 |
.RB [ -f
|
|
Packit |
081926 |
.IR file ]
|
|
Packit |
081926 |
.RB [ -mMlv ]
|
|
Packit |
081926 |
.IR timespec ...
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
.RB [ -V ]
|
|
Packit |
081926 |
.RB [ -q
|
|
Packit |
081926 |
.IR queue ]
|
|
Packit |
081926 |
.RB [ -f
|
|
Packit |
081926 |
.IR file ]
|
|
Packit |
081926 |
.RB [ -mMkv ]
|
|
Packit |
081926 |
.RB [ -t
|
|
Packit |
081926 |
.IR time ]
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B "at -c"
|
|
Packit |
081926 |
.I job
|
|
Packit |
081926 |
.RI [ job... ]
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B atq
|
|
Packit |
081926 |
.RB [ -V ]
|
|
Packit |
081926 |
.RB [ -q
|
|
Packit |
081926 |
.IR queue ]
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
.RB [ -rd ]
|
|
Packit |
081926 |
.I job
|
|
Packit |
081926 |
.RI [ job... ]
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B atrm
|
|
Packit |
081926 |
.RB [ -V ]
|
|
Packit |
081926 |
.I job
|
|
Packit |
081926 |
.RI [ job... ]
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B batch
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.B "at -b"
|
|
Packit |
081926 |
.SH DESCRIPTION
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
and
|
|
Packit |
081926 |
.B batch
|
|
Packit |
081926 |
read commands from standard input or a specified file which are to
|
|
Packit |
081926 |
be executed at a later time, using
|
|
Packit |
081926 |
.BR /bin/sh .
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BR at
|
|
Packit |
081926 |
executes commands at a specified time.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BR atq
|
|
Packit |
081926 |
lists the user's pending jobs, unless the user is the superuser; in that
|
|
Packit |
081926 |
case, everybody's jobs are listed. The format of the output lines (one
|
|
Packit |
081926 |
for each job) is: Job number, date, hour, queue, and username.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BR atrm
|
|
Packit |
081926 |
deletes jobs, identified by their job number.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BR batch
|
|
Packit |
081926 |
executes commands when system load levels permit; in other words, when the load average
|
|
Packit |
081926 |
drops below @LOADAVG_MX@, or the value specified in the invocation of
|
|
Packit |
081926 |
.BR atd .
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
.B At
|
|
Packit |
081926 |
allows fairly complex time
|
|
Packit |
081926 |
specifications, extending the POSIX.2 standard. It accepts times
|
|
Packit |
081926 |
of the form
|
|
Packit |
081926 |
.B HH:MM
|
|
Packit |
081926 |
to run a job at a specific time of day.
|
|
Packit |
081926 |
(If that time is already past, the next day is assumed.)
|
|
Packit |
081926 |
You may also specify
|
|
Packit |
081926 |
.B midnight,
|
|
Packit |
081926 |
.B noon,
|
|
Packit |
081926 |
or
|
|
Packit |
081926 |
.B teatime
|
|
Packit |
081926 |
(4pm)
|
|
Packit |
081926 |
and you can have a time-of-day suffixed with
|
|
Packit |
081926 |
.B AM
|
|
Packit |
081926 |
or
|
|
Packit |
081926 |
.B PM
|
|
Packit |
081926 |
for running in the morning or the evening.
|
|
Packit |
081926 |
You can also say what day the job will be run,
|
|
Packit |
081926 |
by giving a date in the form
|
|
Packit |
081926 |
.B month-name
|
|
Packit |
081926 |
.B day
|
|
Packit |
081926 |
with an optional
|
|
Packit |
081926 |
.B year,
|
|
Packit |
081926 |
or giving a date of the form
|
|
Packit |
081926 |
.IR MMDD [ CC ] YY ,
|
|
Packit |
081926 |
.IR MM / DD /[ CC ] YY ,
|
|
Packit |
081926 |
.IR DD . MM .[ CC ] YY
|
|
Packit |
081926 |
or
|
|
Packit |
081926 |
.RI [ CC ] YY - MM - DD .
|
|
Packit |
081926 |
The specification of a date
|
|
Packit |
081926 |
.I must
|
|
Packit |
081926 |
follow the specification of the time of day.
|
|
Packit |
081926 |
You can also give times like
|
|
Packit |
081926 |
.B now
|
|
Packit |
081926 |
.B \+
|
|
Packit |
081926 |
.I count
|
|
Packit |
081926 |
.I time-units,
|
|
Packit |
081926 |
where the time-units can be
|
|
Packit |
081926 |
.B minutes,
|
|
Packit |
081926 |
.B hours,
|
|
Packit |
081926 |
.B days,
|
|
Packit |
081926 |
or
|
|
Packit |
081926 |
.B weeks
|
|
Packit |
081926 |
and you can tell
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
to run the job today by suffixing the time with
|
|
Packit |
081926 |
.B today
|
|
Packit |
081926 |
and to run the job tomorrow by suffixing the time with
|
|
Packit |
081926 |
.B tomorrow.
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
For example, to run a job at 4pm three days from now, you would do
|
|
Packit |
081926 |
.B at 4pm + 3 days,
|
|
Packit |
081926 |
to run a job at 10:00am on July 31, you would do
|
|
Packit |
081926 |
.B at 10am Jul 31
|
|
Packit |
081926 |
and to run a job at 1am tomorrow, you would do
|
|
Packit |
081926 |
.B at 1am tomorrow.
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
If you specify a job to absolutely run at a specific time and date in
|
|
Packit |
081926 |
the past, the job will run as soon as possible. For example, if it is
|
|
Packit |
081926 |
8pm and you do a
|
|
Packit |
081926 |
.B at 6pm today,
|
|
Packit |
081926 |
it will run more likely at 8:05pm.
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
The definition of the time specification can be found in
|
|
Packit |
081926 |
.IR @prefix@/share/doc/at/timespec .
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
For both
|
|
Packit |
081926 |
.BR at " and " batch ,
|
|
Packit |
081926 |
commands are read from standard input or the file specified
|
|
Packit |
081926 |
with the
|
|
Packit |
081926 |
.B -f
|
|
Packit |
081926 |
option and executed.
|
|
Packit |
081926 |
The working directory, the environment (except for the variables
|
|
Packit |
081926 |
.BR BASH_VERSINFO ,
|
|
Packit |
081926 |
.BR DISPLAY ,
|
|
Packit |
081926 |
.BR EUID ,
|
|
Packit |
081926 |
.BR GROUPS ,
|
|
Packit |
081926 |
.BR SHELLOPTS ,
|
|
Packit |
081926 |
.BR TERM ,
|
|
Packit |
081926 |
.BR UID ,
|
|
Packit |
081926 |
and
|
|
Packit |
081926 |
.BR _ )
|
|
Packit |
081926 |
and the umask are retained from the time of invocation.
|
|
Packit |
081926 |
|
|
Packit |
081926 |
As
|
|
Packit |
081926 |
.BR at
|
|
Packit |
081926 |
is currently implemented as a setuid program, other environment variables (e.g.
|
|
Packit |
081926 |
.BR LD_LIBRARY_PATH " or " LD_PRELOAD )
|
|
Packit |
081926 |
are also not exported. This may change in the future. As a workaround,
|
|
Packit |
081926 |
set these variables explicitly in your job.
|
|
Packit |
081926 |
|
|
Packit |
081926 |
An
|
|
Packit |
081926 |
.BR "at " \-
|
|
Packit |
081926 |
or
|
|
Packit |
081926 |
.BR "batch "\-
|
|
Packit |
081926 |
command invoked from a
|
|
Packit |
081926 |
.B su(1)
|
|
Packit |
081926 |
shell will retain the current userid.
|
|
Packit |
081926 |
The user will be mailed standard error and standard output from his
|
|
Packit |
081926 |
commands, if any.
|
|
Packit |
081926 |
Mail will be sent using the command
|
|
Packit |
081926 |
.BR @MAIL_CMD@ .
|
|
Packit |
081926 |
If
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
is executed from a
|
|
Packit |
081926 |
.B su(1)
|
|
Packit |
081926 |
shell, the owner of the login shell will receive the mail.
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
The superuser may use these commands in any case.
|
|
Packit |
081926 |
For other users, permission to use at is determined by the files
|
|
Packit |
081926 |
.I @ETCDIR@/at.allow
|
|
Packit |
081926 |
and
|
|
Packit |
081926 |
.IR @ETCDIR@/at.deny .
|
|
Packit |
081926 |
See
|
|
Packit |
081926 |
.BR at.allow (5)
|
|
Packit |
081926 |
for details.
|
|
Packit |
081926 |
.SH OPTIONS
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.B -V
|
|
Packit |
081926 |
prints the version number to standard error and exit successfully.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BI \-q " queue"
|
|
Packit |
081926 |
uses the specified queue.
|
|
Packit |
081926 |
A queue designation consists of a single letter; valid queue designations
|
|
Packit |
081926 |
range from
|
|
Packit |
081926 |
.B a
|
|
Packit |
081926 |
to
|
|
Packit |
081926 |
.BR z
|
|
Packit |
081926 |
and
|
|
Packit |
081926 |
.B A
|
|
Packit |
081926 |
to
|
|
Packit |
081926 |
.BR Z .
|
|
Packit |
081926 |
The
|
|
Packit |
081926 |
.B a
|
|
Packit |
081926 |
queue is the default for
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
and the
|
|
Packit |
081926 |
.B b
|
|
Packit |
081926 |
queue for
|
|
Packit |
081926 |
.BR batch .
|
|
Packit |
081926 |
Queues with higher letters run with increased niceness. The special
|
|
Packit |
081926 |
queue "=" is reserved for jobs which are currently running.
|
|
Packit Service |
56f18b |
|
|
Packit |
081926 |
If a job is submitted to a queue designated with an uppercase letter, the
|
|
Packit |
081926 |
job is treated as if it were submitted to batch at the time of the job.
|
|
Packit |
081926 |
Once the time is reached, the batch processing rules with respect to load
|
|
Packit |
081926 |
average apply.
|
|
Packit |
081926 |
If
|
|
Packit |
081926 |
.BR atq
|
|
Packit |
081926 |
is given a specific queue, it will only show jobs pending in that queue.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.B \-m
|
|
Packit |
081926 |
Send mail to the user when the job has completed even if there was no
|
|
Packit |
081926 |
output.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.B \-M
|
|
Packit |
081926 |
Never send mail to the user.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BI \-f " file"
|
|
Packit |
081926 |
Reads the job from
|
|
Packit |
081926 |
.I file
|
|
Packit |
081926 |
rather than standard input.
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.BI \-t " time"
|
|
Packit |
081926 |
run the job at
|
|
Packit |
081926 |
.IR time ,
|
|
Packit |
081926 |
given in the format [[CC]YY]MMDDhhmm[.ss]
|
|
Packit |
081926 |
.TP 8
|
|
Packit |
081926 |
.B \-l
|
|
Packit |
081926 |
Is an alias for
|
|
Packit |
081926 |
.B atq.
|
|
Packit |
081926 |
.TP
|
|
Packit |
081926 |
.B \-r
|
|
Packit |
081926 |
Is an alias for
|
|
Packit |
081926 |
.B atrm.
|
|
Packit |
081926 |
.TP
|
|
Packit |
081926 |
.B \-d
|
|
Packit |
081926 |
Is an alias for
|
|
Packit |
081926 |
.B atrm.
|
|
Packit |
081926 |
.TP
|
|
Packit |
081926 |
.B \-b
|
|
Packit |
081926 |
is an alias for
|
|
Packit |
081926 |
.BR batch .
|
|
Packit |
081926 |
.TP
|
|
Packit |
081926 |
.B \-v
|
|
Packit |
081926 |
Shows the time the job will be executed before reading the job.
|
|
Packit |
081926 |
.P
|
|
Packit |
081926 |
Times displayed will be in the format "Thu Feb 20 14:50:00 1997".
|
|
Packit |
081926 |
.TP
|
|
Packit |
081926 |
.B
|
|
Packit |
081926 |
\-c
|
|
Packit |
081926 |
cats the jobs listed on the command line to standard output.
|
|
Packit |
081926 |
.SH FILES
|
|
Packit |
081926 |
.I @ATJBD@
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.I @ATSPD@
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.I /proc/loadavg
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.I /var/run/utmp
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.I @ETCDIR@/at.allow
|
|
Packit |
081926 |
.br
|
|
Packit |
081926 |
.I @ETCDIR@/at.deny
|
|
Packit |
081926 |
.SH SEE ALSO
|
|
Packit |
081926 |
.BR at.allow (5),
|
|
Packit |
081926 |
.BR at.deny (5),
|
|
Packit |
081926 |
.BR atd (8),
|
|
Packit |
081926 |
.BR cron (1),
|
|
Packit |
081926 |
.BR nice (1),
|
|
Packit |
081926 |
.BR sh (1),
|
|
Packit |
081926 |
.BR umask (2).
|
|
Packit |
081926 |
.SH BUGS
|
|
Packit |
081926 |
The correct operation of
|
|
Packit |
081926 |
.B batch
|
|
Packit |
081926 |
for Linux depends on the presence of a
|
|
Packit |
081926 |
.IR proc -
|
|
Packit |
081926 |
type directory mounted on
|
|
Packit |
081926 |
.IR /proc .
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
If the file
|
|
Packit |
081926 |
.I /var/run/utmp
|
|
Packit |
081926 |
is not available or corrupted, or if the user is not logged on at the
|
|
Packit |
081926 |
time
|
|
Packit |
081926 |
.B at
|
|
Packit |
081926 |
is invoked, the mail is sent to the userid found
|
|
Packit |
081926 |
in the environment variable
|
|
Packit |
081926 |
.BR LOGNAME .
|
|
Packit |
081926 |
If that is undefined or empty, the current userid is assumed.
|
|
Packit |
081926 |
.PP
|
|
Packit |
081926 |
.B At
|
|
Packit |
081926 |
and
|
|
Packit |
081926 |
.B batch
|
|
Packit |
081926 |
as presently implemented are not suitable when users are competing for
|
|
Packit |
081926 |
resources.
|
|
Packit |
081926 |
If this is the case for your site, you might want to consider another
|
|
Packit |
081926 |
batch system, such as
|
|
Packit |
081926 |
.BR nqs .
|
|
Packit |
081926 |
.SH AUTHOR
|
|
Packit |
081926 |
At was mostly written by Thomas Koenig, ig25@rz.uni-karlsruhe.de.
|