Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ crontab(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

at(1)

sh(1)

cron(1M)




crontab(1) crontab(1)
NAME crontab - aids in the use of the cron process scheduling program SYNOPSIS crontab [file] crontab -l crontab -r ARGUMENTS file Specifies the file to be copied. -l Lists the crontab file for the invoking user. -r Removes a user's crontab from the crontab directory. DESCRIPTION crontab is a utility that aids in the use of the cron process scheduling program. A crontab file stipulates the timetable for regular process scheduling. crontab copies the specified file, or standard input if no file is specified, into a directory that holds all users' crontabs. If standard input is used, an EOF (CONTROL-D by default in the A/UX standard distribution) must be entered to terminate the processes. You are permitted to use crontab if your name appears in the file /usr/lib/cron/cron.allow. If that file does not exist, the file /usr/lib/cron/cron.deny is checked to determine if you should be denied access to crontab. If neither file exists, only root is allowed to submit a job. The allow/deny files consist of one username per line. A crontab file consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer patterns that specify the following: minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), day of the week (0-6with 0=Sunday). Each of these patterns may be either an asterisk (meaning all legal values), or a list of elements separated by commas. An element is either a number, or two numbers separated by a minus sign (meaning an inclusive range). Note that the specification of days may be made by two fields (day of the month and day of the week). If both are specified as a list of elements, both are adhered to. January 1992 1



crontab(1) crontab(1)
For example, 0 0 1,15 * 1 would run a command on the first and fifteenth of each month, as well as on every Monday. To specify days by only one field, the other field should be set to * (for example, 0 0 * * 1 would run a command only on Mondays). Thus, a secondary meaning of asterisk is ``use the other field.'' The sixth field of a line in a crontab file is a string that is executed by the shell at the specified times. A percent character in this field (unless escaped by \) is translated to a newline character. Only the first line (up to a % or end-of-line) of the command field is executed by the shell. The other strings following the percent character are made available to the command as standard input. cron reads only one line at a time. For example, 0 0 * * 1 cat %GO%HOME%EARLY% would mail the output: GO HOME EARLY to the user at the requested time. The shell is invoked from your $HOME directory with an arg0 of sh. Users who desire to have their .profile executed must do so explicitly in the crontab file. cron supplies a default environment for every shell, defining: HOME LOGNAME SHELL(=/bin/sh) PATH(=:/bin:/usr/bin:/usr/lbin) Note: Users should remember to redirect the standard output and standard error of their commands! If this is not done, any generated output or errors will be mailed to the user (via mail(1)). 2 January 1992



crontab(1) crontab(1)
FILES /usr/bin/crontab Executable file /usr/lib/crontab Executable file /usr/lib/cron Executable file /usr/spool/cron/crontabs Executable file /usr/lib/cron/log Executable file /usr/lib/cron/cron.allow Executable file /usr/lib/cron/cron.deny Executable file SEE ALSO at(1), sh(1) cron(1M) in A/UX System Administrator's Reference January 1992 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026