[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.6

1.6     ! deraadt     1: .\" $OpenBSD: at.1,v 1.5 1998/02/12 18:24:50 marc 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.1       deraadt     4: .Dt "AT" 1
1.3       michaels    5: .Os
1.1       deraadt     6: .Sh NAME
                      7: .Nm at, batch, atq, atrm
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
                     16: .Pp
1.4       millert    17: .Nm at
                     18: .Op Fl V
                     19: .Fl c Ar job Op Ar job ...
                     20: .Pp
1.1       deraadt    21: .Nm atq
1.4       millert    22: .Op Fl V
1.1       deraadt    23: .Op Fl q Ar queue
                     24: .Op Fl v
                     25: .Pp
                     26: .Nm atrm
1.4       millert    27: .Op Fl V
1.1       deraadt    28: .Ar job
                     29: .Op Ar job ...
                     30: .Pp
                     31: .Nm batch
1.4       millert    32: .Op Fl V
                     33: .Op Fl q Ar queue
1.1       deraadt    34: .Op Fl f Ar file
1.4       millert    35: .Op Fl mv
                     36: .Op Ar time
1.1       deraadt    37: .Sh DESCRIPTION
1.4       millert    38: .Nm At
1.1       deraadt    39: and
                     40: .Nm batch
1.4       millert    41: read commands from standard input or a specified file which
                     42: are to be executed at a later time, using
1.1       deraadt    43: .Xr sh 1 .
                     44: .Bl -tag -width indent
                     45: .It Nm at
                     46: Executes commands at a specified time.
                     47: .It Nm atq
1.4       millert    48: Lists the user's pending jobs, unless the user is the superuser.
                     49: In that case, everybody's jobs are listed.
1.1       deraadt    50: .It Nm atrm
                     51: Deletes jobs.
                     52: .It Nm batch
1.4       millert    53: Executes commands when system load levels permit.  In other words, when
                     54: the load average drops below 1.5, or the value specified in the invocation of
                     55: .Nm atrun .
1.1       deraadt    56: .El
                     57: .Pp
                     58: .Nm At
1.4       millert    59: allows some moderately complex
                     60: .Ar time
                     61: specifications.  It accepts times of the form
1.1       deraadt    62: .Ar HHMM
                     63: or
                     64: .Ar HH:MM
1.4       millert    65: to run a job at a specific time of day.
                     66: (If that time is already past, the next day is assumed.)
1.1       deraadt    67: You may also specify
                     68: .Nm midnight ,
                     69: .Nm noon ,
                     70: or
                     71: .Nm teatime
1.4       millert    72: (4pm)
                     73: and you can have a time-of-day suffixed with
1.1       deraadt    74: .Nm AM
                     75: or
                     76: .Nm PM
1.4       millert    77: for running in the morning or the evening.
                     78: You can also say what day the job will be run,
1.1       deraadt    79: by giving a date in the form
1.4       millert    80: .Ar \%month-name day
1.1       deraadt    81: with an optional
                     82: .Ar year ,
                     83: or giving a date of the form
1.4       millert    84: .Ar MMDDYY
                     85: or
1.1       deraadt    86: .Ar MM/DD/YY
                     87: or
                     88: .Ar DD.MM.YY .
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
                    105: .Nm tomorrow.
                    106: .Pp
                    107: For example, to run a job at 4pm three days from now, you would do
                    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: and to run a job at 1am tomorrow, you would do
                    112: .Nm at 1am tomorrow.
                    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
                    123: .Nm TERM ,
                    124: .Nm TERMCAP ,
                    125: .Nm DISPLAY
                    126: and
                    127: .Nm _ )
                    128: and the
                    129: .Ar umask
                    130: are retained from the time of invocation.
                    131: An
                    132: .Nm at
                    133: or
                    134: .Nm batch
                    135: command invoked from a
                    136: .Xr su 1
                    137: shell will retain the current userid.
                    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
                    143: is executed from a
                    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
                    162: is checked, every username not mentioned in it is then allowed
                    163: to use
                    164: .Nm at .
                    165: .Pp
                    166: If neither exists, only the superuser is allowed use of
                    167: .Nm at .
                    168: .Pp
                    169: An empty
                    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
                    182: to
                    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
                    203: Send mail to the user when the job has completed even if there was no
                    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
                    211: .Nm atq.
                    212: .It Fl d
                    213: Is an alias for
                    214: .Nm atrm.
                    215: .It Fl b
                    216: Is an alias for
                    217: .Nm batch.
                    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.6     ! deraadt   224: Cats 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
                    228: Directory containing job files
                    229: .It Pa /var/at/spool
                    230: Directory containing output spool files
1.4       millert   231: .It Pa /var/run/utmp
                    232: Login records
                    233: .It Pa /var/at/at.allow
                    234: Allow permission control
                    235: .It Pa /var/at/at.deny
                    236: Deny permission control
                    237: .It Pa /var/at/.lockfile
1.1       deraadt   238: Job-creation lock file.
                    239: .Sh SEE ALSO
                    240: .Xr cron 8 ,
                    241: .Xr nice 1 ,
1.4       millert   242: .Xr umask 2 ,
1.1       deraadt   243: .Xr sh 1 ,
1.4       millert   244: .Xr sendmail 8 ,
                    245: .Xr atrun 8 .
1.1       deraadt   246: .El
                    247: .Sh BUGS
                    248: .Pp
                    249: If the file
                    250: .Pa /var/run/utmp
1.4       millert   251: is not available or corrupted, or if the user is not logged on at the
                    252: time
1.1       deraadt   253: .Nm at
1.4       millert   254: is invoked, the mail is sent to the userid found
                    255: in the environment variable
1.1       deraadt   256: .Nm LOGNAME .
                    257: If that is undefined or empty, the current userid is assumed.
1.4       millert   258: .Pp
                    259: .Nm At
                    260: and
                    261: .Nm batch
                    262: as presently implemented are not suitable when users are competing for
                    263: resources.
                    264: If this is the case for your site, you might want to consider another
                    265: batch system, such as
                    266: .Nm nqs .
                    267: .Sh AUTHORS
                    268: At was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>.
                    269: The time parsing routines are by David Parsons <orc@pell.chi.il.us>.