version 1.6, 1998/06/05 00:47:46 |
version 1.7, 1998/09/23 04:32:34 |
|
|
.\" $OpenBSD$ |
.\" $OpenBSD$ |
.\" $FreeBSD: at.man,v 1.6 1997/02/22 19:54:05 peter Exp $ |
.\" $FreeBSD: at.man,v 1.6 1997/02/22 19:54:05 peter Exp $ |
.Dd April 12, 1995 |
.Dd April 12, 1995 |
.Dt "AT" 1 |
.Dt AT 1 |
.Os |
.Os |
.Sh NAME |
.Sh NAME |
.Nm at, batch, atq, atrm |
.Nm at, atq, atrm, batch |
.Nd queue, examine or delete jobs for later execution |
.Nd queue, examine or delete jobs for later execution |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm at |
.Nm at |
|
|
.Op Fl f Ar file |
.Op Fl f Ar file |
.Op Fl mldbv |
.Op Fl mldbv |
.Ar time |
.Ar time |
.Pp |
|
.Nm at |
.Nm at |
.Op Fl V |
.Op Fl V |
.Fl c Ar job Op Ar job ... |
.Fl c Ar job Op Ar job ... |
.Pp |
|
.Nm atq |
.Nm atq |
.Op Fl V |
.Op Fl V |
.Op Fl q Ar queue |
.Op Fl q Ar queue |
.Op Fl v |
.Op Fl v |
.Pp |
|
.Nm atrm |
.Nm atrm |
.Op Fl V |
.Op Fl V |
.Ar job |
.Ar job |
.Op Ar job ... |
.Op Ar job ... |
.Pp |
|
.Nm batch |
.Nm batch |
.Op Fl V |
.Op Fl V |
.Op Fl q Ar queue |
.Op Fl q Ar queue |
|
|
.Op Fl mv |
.Op Fl mv |
.Op Ar time |
.Op Ar time |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm At |
.Nm at |
and |
and |
.Nm batch |
.Nm batch |
read commands from standard input or a specified file which |
read commands from standard input or a specified file which |
|
|
Executes commands at a specified time. |
Executes commands at a specified time. |
.It Nm atq |
.It Nm atq |
Lists the user's pending jobs, unless the user is the superuser. |
Lists the user's pending jobs, unless the user is the superuser. |
In that case, everybody's jobs are listed. |
In that case, all users' jobs are listed. |
.It Nm atrm |
.It Nm atrm |
Deletes jobs. |
Deletes jobs. |
.It Nm batch |
.It Nm batch |
|
|
.Nm atrun . |
.Nm atrun . |
.El |
.El |
.Pp |
.Pp |
.Nm At |
.Nm at |
allows some moderately complex |
allows some moderately complex |
.Ar time |
.Ar time |
specifications. It accepts times of the form |
specifications. It accepts times of the form |
|
|
with an optional |
with an optional |
.Ar year , |
.Ar year , |
or giving a date of the form |
or giving a date of the form |
.Ar MMDDYY |
.Ar MMDDYY , |
or |
|
.Ar MM/DD/YY |
.Ar MM/DD/YY |
or |
or |
.Ar DD.MM.YY . |
.Ar DD.MM.YY . |
|
|
.Nm tomorrow. |
.Nm tomorrow. |
.Pp |
.Pp |
For example, to run a job at 4pm three days from now, you would do |
For example, to run a job at 4pm three days from now, you would do |
.Nm at 4pm + 3 days , |
.Nm at 4pm + 3 days . |
to run a job at 10:00am on July 31, you would do |
To run a job at 10:00am on July 31, you would do |
.Nm at 10am Jul 31 |
.Nm at 10am Jul 31 . |
and to run a job at 1am tomorrow, you would do |
To run a job at 1am tomorrow, you would do |
.Nm at 1am tomorrow. |
.Nm at 1am tomorrow. |
.Pp |
.Pp |
For both |
For both |
|
|
.Fl f |
.Fl f |
option and executed. |
option and executed. |
The working directory, the environment (except for the variables |
The working directory, the environment (except for the variables |
.Nm TERM , |
.Ev TERM , |
.Nm TERMCAP , |
.Ev TERMCAP , |
.Nm DISPLAY |
.Ev DISPLAY , |
and |
and |
.Nm _ ) |
.Ev _ ) |
and the |
and the |
.Ar umask |
.Ar umask |
are retained from the time of invocation. |
are retained from the time of invocation. |
|
|
.Nm batch |
.Nm batch |
command invoked from a |
command invoked from a |
.Xr su 1 |
.Xr su 1 |
shell will retain the current userid. |
shell will retain the current user ID. |
The user will be mailed standard error and standard output from his |
The user will be mailed standard error and standard output from his |
commands, if any. Mail will be sent using the command |
commands, if any. Mail will be sent using the command |
.Xr sendmail 8 . |
.Xr sendmail 8 . |
|
|
.Pa /var/at/at.allow |
.Pa /var/at/at.allow |
does not exist, |
does not exist, |
.Pa /var/at/at.deny |
.Pa /var/at/at.deny |
is checked, every username not mentioned in it is then allowed |
is checked. Every username not mentioned in it is then allowed |
to use |
to use |
.Nm at . |
.Nm at . |
.Pp |
.Pp |
|
|
.Nm atq |
.Nm atq |
is given a specific queue, it will only show jobs pending in that queue. |
is given a specific queue, it will only show jobs pending in that queue. |
.It Fl m |
.It Fl m |
Send mail to the user when the job has completed even if there was no |
Send mail to the user when the job has completed, even if there was no |
output. |
output. |
.It Fl f Ar file |
.It Fl f Ar file |
Reads the job from |
Reads the job from |
|
|
rather than standard input. |
rather than standard input. |
.It Fl l |
.It Fl l |
Is an alias for |
Is an alias for |
.Nm atq. |
.Nm atq . |
.It Fl d |
.It Fl d |
Is an alias for |
Is an alias for |
.Nm atrm. |
.Nm atrm . |
.It Fl b |
.It Fl b |
Is an alias for |
Is an alias for |
.Nm batch. |
.Nm batch . |
.It Fl v |
.It Fl v |
For |
For |
.Nm atq , |
.Nm atq , |
shows completed but not yet deleted jobs in the queue. Otherwise |
shows completed but not yet deleted jobs in the queue. Otherwise |
shows the time the job will be executed. |
shows the time the job will be executed. |
.It Fl c |
.It Fl c |
Cats the jobs listed on the command line to standard output. |
Prints the jobs listed on the command line to standard output. |
.Sh FILES |
.Sh FILES |
.Bl -tag -width /var/at/.lockfile -compact |
.Bl -tag -width /var/at/.lockfile -compact |
.It Pa /var/at/jobs |
.It Pa /var/at/jobs |
Directory containing job files |
directory containing job files |
.It Pa /var/at/spool |
.It Pa /var/at/spool |
Directory containing output spool files |
directory containing output spool files |
.It Pa /var/run/utmp |
.It Pa /var/run/utmp |
Login records |
login records |
.It Pa /var/at/at.allow |
.It Pa /var/at/at.allow |
Allow permission control |
allow permission control |
.It Pa /var/at/at.deny |
.It Pa /var/at/at.deny |
Deny permission control |
deny permission control |
.It Pa /var/at/.lockfile |
.It Pa /var/at/.lockfile |
Job-creation lock file. |
job-creation lock file |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr cron 8 , |
|
.Xr nice 1 , |
.Xr nice 1 , |
.Xr umask 2 , |
|
.Xr sh 1 , |
.Xr sh 1 , |
.Xr sendmail 8 , |
.Xr umask 2 , |
.Xr atrun 8 . |
.Xr atrun 8 , |
|
.Xr cron 8 , |
|
.Xr sendmail 8 |
.El |
.El |
.Sh BUGS |
.Sh BUGS |
.Pp |
|
If the file |
If the file |
.Pa /var/run/utmp |
.Pa /var/run/utmp |
is not available or corrupted, or if the user is not logged on at the |
is not available or corrupted, or if the user is not logged on at the |
time |
time |
.Nm at |
.Nm at |
is invoked, the mail is sent to the userid found |
is invoked, the mail is sent to the user ID found |
in the environment variable |
in the environment variable |
.Nm LOGNAME . |
.Ev LOGNAME . |
If that is undefined or empty, the current userid is assumed. |
If that is undefined or empty, the current user ID is assumed. |
.Pp |
.Pp |
.Nm At |
.Nm at |
and |
and |
.Nm batch |
.Nm batch |
as presently implemented are not suitable when users are competing for |
as presently implemented are not suitable when users are competing for |
|
|
batch system, such as |
batch system, such as |
.Nm nqs . |
.Nm nqs . |
.Sh AUTHORS |
.Sh AUTHORS |
At was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>. |
.Nm at |
|
was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>. |
The time parsing routines are by David Parsons <orc@pell.chi.il.us>. |
The time parsing routines are by David Parsons <orc@pell.chi.il.us>. |