[0m


CRONTAB(1)	    UNIX Programmer's Manual	       CRONTAB(1)



[1mNAME
     [0mcrontab - create, list or remove user crontab file

[1mSYNOPSIS
     crontab [0m[ [1mfile [0m]
     [1mcrontab -l
     crontab -r

DESCRIPTION
     [0mThis utility copies the specified file, or standard input if
     no file is specified, into the directory
     /var/spool/cron/crontabs.	The name of the file created in
     the crontabs directory will be the same as the user's user-
     name.

     If called with the -l option, the user's crontab file is
     listed.
     If called with the -r option, the user's crontab file is
     removed.

     Users are allowed to use [1mcrontab [0mif their names appear in
     the file [1m/var/spool/cron/cron.allow. [0mIf that file does not
     exist, the file [1m/var/spool/cron/cron.deny [0mis checked to see
     if the user is to be denied access to crontab.  If neither
     file exists, only root has access. If only cron.deny exists,
     and it is empty, all users have access.  The [1mcron.allow [0mand
     [1mcron.deny [0mfiles consist of one user name per line.

     A crontab file consists of a sequence of non-blank lines.
     Each line has six fields, each field being separated by
     spaces or tabs.  The first five fields are used to specify a
     time and day when the sixth field (a string) is to be exe-
     cuted by the shell. The details are as follows:


	  Field 1      minute [0,59]
	  Field 2      hour [0,23]
	  Field 3      day of month [1,31]
	  Field 4      month of year [1,12]
	  Field 5      day of week [0,6] (where 0 = Sunday)

     Each of these numerical-type fields can be specified as fol-
     lows:


	  Field-contents	     Meaning
	  *			     all legal values
	  number-number              range of values
	  number{,number{-number}}   list of values

     It will be noticed that there is a degree of overlap in the
     way in which days can be specified, i.e. the command (sixth



Printed 24/1/92     Revision 1.2 of 17/09/90			1






CRONTAB(1)	    UNIX Programmer's Manual	       CRONTAB(1)



     field) can be made to run on a certain day of the week
     (every week), or on a particular day of the month or a com-
     bination of the two.  When specifying days by only one
     field, the other field should be set to *.

     The sixth field specifies the command to be executed by the
     shell.  A % 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 lines are passed to the command as
     standard input.

     A default environment is provided for the user when their
     commands are executed. This is as follows:

     HOME=(users home directory)
     LOGNAME=(username)
     PATH=:/usr/5bin:/usr/bin:/usr/ucb

     The shell used to execute the commands is /usr/bin/sh the
     commands being run from the user's home directory.

     Lines in a crontab file which begin with a `#' are ignored.
     If standard output and standard error are not redirected,
     any generated output or errors will be mailed to the user.

[1mEXAMPLE
     [0m$ crontab
     # Run myscript at 4:30 am each Saturday
     # myscipt is an executable file in my home directory,
     # it will be executed by /sbin/sh and
     # the files cron-out and cron-err will be created
     # in my home directory.
     30 2 * * 6 /sbin/sh myscript > cron-out 2> cron-err
     ^D

[1mAPPLICATION USAGE
     [0mA new crontab file for a user overwrites an existing one.
     Typing:
     $ crontab
     ^D
     will create a new, empty crontab file!

[1mFILES
     [0m/var/spool/cron/crontabs	    where user crontab files are stored
     /var/spool/cron/cron.allow     list of allowed users
     /var/spool/cron/cron.deny	    list of denied users

[1mSEE ALSO
     [0mat(1), sh(1), cron(8)





Printed 24/1/92     Revision 1.2 of 17/09/90			2






CRONTAB(1)	    UNIX Programmer's Manual	       CRONTAB(1)



[1mDIAGNOSTICS
     [0mComplains about various syntax errors (including blank
     lines).




















































Printed 24/1/92     Revision 1.2 of 17/09/90			3



[0m