[BACK]Return to at.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / at

Annotation of src/usr.bin/at/at.1, Revision 1.10

1.10    ! aaron       1: .\" $OpenBSD: at.1,v 1.9 1999/03/21 04:04:41 alex Exp $
1.4       millert     2: .\" $FreeBSD: at.man,v 1.6 1997/02/22 19:54:05 peter Exp $
                      3: .Dd April 12, 1995
1.7       aaron       4: .Dt AT 1
1.3       michaels    5: .Os
1.1       deraadt     6: .Sh NAME
1.7       aaron       7: .Nm at, atq, atrm, batch
1.4       millert     8: .Nd queue, examine or delete jobs for later execution
1.1       deraadt     9: .Sh SYNOPSIS
                     10: .Nm at
1.4       millert    11: .Op Fl V
1.1       deraadt    12: .Op Fl q Ar queue
                     13: .Op Fl f Ar file
1.4       millert    14: .Op Fl mldbv
1.1       deraadt    15: .Ar time
1.4       millert    16: .Nm at
                     17: .Op Fl V
                     18: .Fl c Ar job Op Ar job ...
1.1       deraadt    19: .Nm atq
1.4       millert    20: .Op Fl V
1.1       deraadt    21: .Op Fl q Ar queue
                     22: .Op Fl v
                     23: .Nm atrm
1.4       millert    24: .Op Fl V
1.1       deraadt    25: .Ar job
                     26: .Op Ar job ...
                     27: .Nm batch
1.4       millert    28: .Op Fl V
                     29: .Op Fl q Ar queue
1.1       deraadt    30: .Op Fl f Ar file
1.4       millert    31: .Op Fl mv
                     32: .Op Ar time
1.1       deraadt    33: .Sh DESCRIPTION
1.7       aaron      34: .Nm at
1.1       deraadt    35: and
                     36: .Nm batch
1.4       millert    37: read commands from standard input or a specified file which
                     38: are to be executed at a later time, using
1.1       deraadt    39: .Xr sh 1 .
                     40: .Bl -tag -width indent
                     41: .It Nm at
                     42: Executes commands at a specified time.
                     43: .It Nm atq
1.4       millert    44: Lists the user's pending jobs, unless the user is the superuser.
1.7       aaron      45: In that case, all users' jobs are listed.
1.1       deraadt    46: .It Nm atrm
                     47: Deletes jobs.
                     48: .It Nm batch
1.4       millert    49: Executes commands when system load levels permit.  In other words, when
                     50: the load average drops below 1.5, or the value specified in the invocation of
                     51: .Nm atrun .
1.1       deraadt    52: .El
                     53: .Pp
1.7       aaron      54: .Nm at
1.4       millert    55: allows some moderately complex
                     56: .Ar time
                     57: specifications.  It accepts times of the form
1.1       deraadt    58: .Ar HHMM
                     59: or
                     60: .Ar HH:MM
1.4       millert    61: to run a job at a specific time of day.
                     62: (If that time is already past, the next day is assumed.)
1.1       deraadt    63: You may also specify
                     64: .Nm midnight ,
                     65: .Nm noon ,
                     66: or
                     67: .Nm teatime
1.4       millert    68: (4pm)
                     69: and you can have a time-of-day suffixed with
1.1       deraadt    70: .Nm AM
                     71: or
                     72: .Nm PM
1.4       millert    73: for running in the morning or the evening.
                     74: You can also say what day the job will be run,
1.1       deraadt    75: by giving a date in the form
1.4       millert    76: .Ar \%month-name day
1.1       deraadt    77: with an optional
                     78: .Ar year ,
                     79: or giving a date of the form
1.7       aaron      80: .Ar MMDDYY ,
1.1       deraadt    81: .Ar MM/DD/YY
                     82: or
                     83: .Ar DD.MM.YY .
1.9       alex       84: The year may be given as two digits or four digits.
                     85: If the year is given as two digits, it is taken to occur as soon as
                     86: possible in the future, which may be in the next century --
                     87: unless it's last year, in which case it's considered to be
                     88: a typo.
1.4       millert    89: The specification of a date must follow the specification of
                     90: the time of day.
1.1       deraadt    91: You can also give times like
1.4       millert    92: .Op Nm now
                     93: .Nm + Ar count \%time-units ,
                     94: where the time-units can be
                     95: .Nm minutes ,
                     96: .Nm hours ,
                     97: .Nm days ,
1.1       deraadt    98: or
                     99: .Nm weeks
1.4       millert   100: and you can tell
                    101: .Nm at
                    102: to run the job today by suffixing the time with
1.1       deraadt   103: .Nm today
1.4       millert   104: and to run the job tomorrow by suffixing the time with
1.8       aaron     105: .Nm tomorrow .
1.4       millert   106: .Pp
                    107: For example, to run a job at 4pm three days from now, you would do
1.7       aaron     108: .Nm at 4pm + 3 days .
                    109: To run a job at 10:00am on July 31, you would do
                    110: .Nm at 10am Jul 31 .
                    111: To run a job at 1am tomorrow, you would do
1.8       aaron     112: .Nm at 1am tomorrow .
1.4       millert   113: .Pp
                    114: For both
                    115: .Nm at
                    116: and
                    117: .Nm batch ,
                    118: commands are read from standard input or the file specified
                    119: with the
                    120: .Fl f
                    121: option and executed.
                    122: The working directory, the environment (except for the variables
1.7       aaron     123: .Ev TERM ,
                    124: .Ev TERMCAP ,
                    125: .Ev DISPLAY ,
1.4       millert   126: and
1.7       aaron     127: .Ev _ )
1.4       millert   128: and the
                    129: .Ar umask
                    130: are retained from the time of invocation.
                    131: An
                    132: .Nm at
                    133: or
                    134: .Nm batch
1.10    ! aaron     135: command invoked from a
1.4       millert   136: .Xr su 1
1.7       aaron     137: shell will retain the current user ID.
1.4       millert   138: The user will be mailed standard error and standard output from his
                    139: commands, if any. Mail will be sent using the command
                    140: .Xr sendmail 8 .
                    141: If
                    142: .Nm at
1.10    ! aaron     143: is executed from a
1.4       millert   144: .Xr su 1
                    145: shell, the owner of the login shell will receive the mail.
                    146: .Pp
                    147: The superuser may use these commands in any case.
                    148: For other users, permission to use at is determined by the files
                    149: .Pa /var/at/at.allow
                    150: and
                    151: .Pa /var/at/at.deny .
                    152: .Pp
                    153: If the file
                    154: .Pa /var/at/at.allow
                    155: exists, only usernames mentioned in it are allowed to use
                    156: .Nm at .
                    157: .Pp
                    158: If
                    159: .Pa /var/at/at.allow
                    160: does not exist,
                    161: .Pa /var/at/at.deny
1.7       aaron     162: is checked. Every username not mentioned in it is then allowed
1.4       millert   163: to use
                    164: .Nm at .
                    165: .Pp
                    166: If neither exists, only the superuser is allowed use of
                    167: .Nm at .
                    168: .Pp
1.10    ! aaron     169: An empty
1.4       millert   170: .Pa /var/at/at.deny
                    171: means that every user is allowed use these commands.
1.5       marc      172: This is the default configuration.
1.4       millert   173: .Sh OPTIONS
                    174: .Bl -tag -width indent
                    175: .It Fl V
                    176: Prints the version number to standard error.
                    177: .It Fl q Ar queue
                    178: Uses the specified queue.
                    179: A queue designation consists of a single letter.  Valid queue designations
                    180: range from
                    181: .Nm a
1.10    ! aaron     182: to
1.4       millert   183: .Nm z
                    184: and
                    185: .Nm A
                    186: to
                    187: .Nm Z .
                    188: The
                    189: .Nm c
                    190: queue is the default for
                    191: .Nm at
                    192: and the
                    193: .Nm E
                    194: queue for
                    195: .Nm batch .
                    196: Queues with higher letters run with increased niceness.
                    197: If a job is submitted to a queue designated with an uppercase letter, it
                    198: is treated as if it had been submitted to batch at that time.
                    199: If
                    200: .Nm atq
                    201: is given a specific queue, it will only show jobs pending in that queue.
                    202: .It Fl m
1.7       aaron     203: Send mail to the user when the job has completed, even if there was no
1.4       millert   204: output.
                    205: .It Fl f Ar file
                    206: Reads the job from
                    207: .Ar file
                    208: rather than standard input.
                    209: .It Fl l
                    210: Is an alias for
1.7       aaron     211: .Nm atq .
1.4       millert   212: .It Fl d
                    213: Is an alias for
1.7       aaron     214: .Nm atrm .
1.4       millert   215: .It Fl b
                    216: Is an alias for
1.7       aaron     217: .Nm batch .
1.4       millert   218: .It Fl v
                    219: For
                    220: .Nm atq ,
                    221: shows completed but not yet deleted jobs in the queue.  Otherwise
                    222: shows the time the job will be executed.
                    223: .It Fl c
1.7       aaron     224: Prints the jobs listed on the command line to standard output.
1.1       deraadt   225: .Sh FILES
1.4       millert   226: .Bl -tag -width /var/at/.lockfile -compact
1.1       deraadt   227: .It Pa /var/at/jobs
1.7       aaron     228: directory containing job files
1.1       deraadt   229: .It Pa /var/at/spool
1.7       aaron     230: directory containing output spool files
1.4       millert   231: .It Pa /var/run/utmp
1.7       aaron     232: login records
1.4       millert   233: .It Pa /var/at/at.allow
1.7       aaron     234: allow permission control
1.4       millert   235: .It Pa /var/at/at.deny
1.7       aaron     236: deny permission control
1.4       millert   237: .It Pa /var/at/.lockfile
1.7       aaron     238: job-creation lock file
1.1       deraadt   239: .Sh SEE ALSO
                    240: .Xr nice 1 ,
1.7       aaron     241: .Xr sh 1 ,
1.4       millert   242: .Xr umask 2 ,
1.7       aaron     243: .Xr atrun 8 ,
                    244: .Xr cron 8 ,
                    245: .Xr sendmail 8
1.1       deraadt   246: .El
                    247: .Sh BUGS
                    248: If the file
                    249: .Pa /var/run/utmp
1.4       millert   250: is not available or corrupted, or if the user is not logged on at the
1.10    ! aaron     251: time
1.1       deraadt   252: .Nm at
1.7       aaron     253: is invoked, the mail is sent to the user ID found
1.4       millert   254: in the environment variable
1.7       aaron     255: .Ev LOGNAME .
                    256: If that is undefined or empty, the current user ID is assumed.
1.4       millert   257: .Pp
1.7       aaron     258: .Nm at
1.4       millert   259: and
                    260: .Nm batch
                    261: as presently implemented are not suitable when users are competing for
                    262: resources.
                    263: If this is the case for your site, you might want to consider another
                    264: batch system, such as
                    265: .Nm nqs .
                    266: .Sh AUTHORS
1.7       aaron     267: .Nm at
                    268: was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>.
1.4       millert   269: The time parsing routines are by David Parsons <orc@pell.chi.il.us>.