ccrroonnttaabb -- Command

Copy a command file into the crontab directory
/uussrr/bbiinn/ccrroonnttaabb [-ll] [-rr] [-ff _f_i_l_e_n_a_m_e] [-mm[eedd]] [-uu_u_s_e_r]

The   command    ccrroonnttaabb   copies    a   command   file    into   directory
/uussrr/ssppooooll/ccrroonn/ccrroonnttaabbss. This  directory holds  the command files  for all
users.  This mechanism  permits each user to have her  own file of commands
to be executed  periodically.  If the file name is  `-', then ccrroonnttaabb reads
the standard input.

ccrroonnttaabb recognizes the following options.

-ff _f_i_l_e_n_a_m_e
     Replace your crontab file with _f_i_l_e_n_a_m_e.

-ll   List your crontab file.

-mm[eedd]
     Enable/disable the sending of mail to  a user about any command in her
     crontab file that fails.

-rr   Remove your crontab file.

-uu _u_s_e_r
     Specify _u_s_e_r. Only the superuser  rroooott can specify any user other than
     herself.

_A_l_l_o_w_i_n_g _a_n_d _D_e_n_y_i_n_g _A_c_c_e_s_s
The  files  /uussrr/lliibb/ccrroonn/ccrroonn.aallllooww  and /uussrr/lliibb/ccrroonn/ccrroonn.ddeennyy  let  the
system administrator govern which users can use the ccrroonnttaabb command:

-> If ccrroonn.aallllooww exists, then ccrroonnttaabb  checks its contents; if a given user
   is  identified  therein,   then  she  can  use  ccrroonnttaabb.  Obviously,  if
   ccrroonn.aallllooww exists but is empty, then nobody can use ccrroonnttaabb.

-> If  ccrroonn.aallllooww  does not  exist,  then ccrroonnttaabb  checks  the contents  of
   ccrroonn.ddeennyy. If  a given user  is identified therein, then  she cannot use
   ccrroonnttaabb; otherwise, she can.  If ccrroonn.aallllooww does not exist and ccrroonn.ddeennyy
   exists but is empty, then everyone can use ccrroonnttaabb.

-> If neither file exists, then everyone can use ccrroonnttaabb.

_F_o_r_m_a_t _o_f _a _c_r_o_n_t_a_b _F_i_l_e
A ccrroonnttaabb command file consists  of lines separated by newlines.  Each line
consists  of six  fields separated  by white space  (tabs or  blanks).  The
first five  fields describe  the scheduled  execution time of  the command.
Respectively, they  represent the  minute (0-59),  hour (0-23), day  of the
month  (1-31), month  of  the year  (1-12),  and day  of the  week (0-6,  0
indicates  Sunday).   Each  field  can  contain  a single  integer  in  the
appropriate range,  a pair of  integers separated by a  hyphen `-' (meaning
all  integers between  the two,  inclusive), an  asterisk `*'  (meaning all
legal values), or a comma-separated list of the above forms.  The remainder
of the line gives the command to be executed at the given time.

For example, the ccrroonnttaabb entry

    29 * * 7 0 msg henry Succotash!

means that  every hour on  the half-hour during  each Sunday in  July, ccrroonn
will invoke the command mmssgg, and the user named hheennrryy will have the message

    daemon: Succotash!

written on his terminal's screen (if he is logged in).

ccrroonndd recognizes three special characters and escape sequences in a ccrroonnttaabb
file.  If a command contains the percent character `%', ccrroonndd executes only
the portion up to the first  `%' as a command, then passes the remainder to
the command as its standard input.  ccrroonndd translates any percent characters
`%' in the remainder to newlines.  To prevent the special interpretation of
a  `%', precede  it with  a  backslash, `\%'.   Finally, ccrroonndd  removes the
sequence \<nneewwlliinnee>  from the text before  it passes the text  to the shell
sshh; this can be used to make an entry in the ccrroonnttaabb more legible.

You  must pay  special attention  to permissions when  you write  a ccrroonnttaabb
command file.  For information  on how the ccrroonnttaabb daemon ccrroonndd manipulates
permissions, see the entry for ccrroonndd in the Lexicon.

_D_i_r_e_c_t_o_r_i_e_s _a_n_d _F_i_l_e_s

/uussrr/ssppooooll/ccrroonn/ccrroonnttaabbss
     Main ccrroonn directory.  It holds each user's command file.  Permissions:
     770000 rroooott rroooott.

/uussrr/lliibb/ccrroonn/FFIIFFOO
     Lock file (named pipe).  Created by ccrroonn; removed by ccrroonndd/rrcc.

/uussrr/lliibb/ccrroonn/ccrroonn.aallllooww
     List of allowed users.  Permissions: 660000 rroooott rroooott.

/uussrr/lliibb/ccrroonn/ccrroonn.ddeennyy
     List of denied users.  Permissions: 660000 rroooott rroooott.

/uussrr/lliibb/ccrroonnttaabb
     Global  ccrroonnttaabb  file,  used  by  previous  COHERENT  ccrroonn  mechanism.
     /uussrr/ssppooooll/ccrroonn Spool directory parent.  Permissions: 770000 rroooott rroooott.

/uussrr/ssppooooll/ccrroonn/ccrroonnttaabbss
     Spool directory.  Permissions: 770000 rroooott rroooott.

_S_e_e _A_l_s_o
ccoommmmaannddss, ccrroonndd

_N_o_t_e_s
COHERENT ccrroonnttaabb is superset of the  command of the same name included with
UNIX System V. release 3 (SVR3).  The main differences are as follows:

-> COHERENT  ccrroonnttaabb prints  the usage  when no  options have  been chosen,
   whereas SVR3 ccrroonnttaabb reads stdin  and can just remove the user's crontab
   file.

-> SVR3 ccrroonnttaabb does not include option -ff _f_i_l_e__n_a_m_e.

-> SVR3 ccrroonnttaabb  does not include option -uu _u_s_e_r.   Under SVR3 ccrroonnttaabb, you
   must ssuu to another user (e.g., uuuuccpp) before you can maintain her ccrroonnttaabb
   file.
