xref: /freebsd/usr.sbin/cron/crontab/crontab.1 (revision c17d43407fe04133a94055b0dbc7ea8965654a9f)
1.\"/* Copyright 1988,1990,1993 by Paul Vixie
2.\" * All rights reserved
3.\" *
4.\" * Distribute freely, except: don't remove my name from the source or
5.\" * documentation (don't take credit for my work), mark your changes (don't
6.\" * get me blamed for your possible bugs), don't alter or remove this
7.\" * notice.  May be sold if buildable source is provided to buyer.  No
8.\" * warrantee of any kind, express or implied, is included with this
9.\" * software; use at your own risk, responsibility for damages (if any) to
10.\" * anyone resulting from the use of this software rests entirely with the
11.\" * user.
12.\" *
13.\" * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
14.\" * I'll try to keep a version up to date.  I can be reached as follows:
15.\" * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
16.\" */
17.\"
18.\" $FreeBSD$
19.\"
20.Dd December 29, 1993
21.Dt CRONTAB 1
22.Os
23.Sh NAME
24.Nm crontab
25.Nd maintain crontab files for individual users (V3)
26.Sh SYNOPSIS
27.Nm
28.Op Fl u Ar user
29.Ar file
30.Nm
31.Op Fl u Ar user
32{
33.Fl l |
34.Fl r |
35.Fl e
36}
37.Sh DESCRIPTION
38.Nm Crontab
39is the program used to install, deinstall or list the tables
40used to drive the
41.Xr cron 8
42daemon in Vixie Cron.  Each user can have their own crontab, and though
43these are files in
44.Pa /var ,
45they are not intended to be edited directly.
46.Pp
47If the
48.Pa allow
49file exists, then you must be listed therein in order to be allowed to use
50this command.  If the
51.Pa allow
52file does not exist but the
53.Pa deny
54file does exist, then you must
55.Em not
56be listed in the
57.Pa deny
58file in order to use this command.  If neither of these files exists, then
59depending on site-dependent configuration parameters, only the super user
60will be allowed to use this command, or all users will be able to use this
61command.
62The format of these files is one username per line,
63with no leading or trailing whitespace.
64Lines of other formats will be ignored,
65and so can be used for comments.
66.Pp
67The first form of this command is used to install a new crontab from some
68named file or standard input if the pseudo-filename ``-'' is given.
69.Pp
70The following options are available:
71.Bl -tag -width indent
72.It Fl u
73Specify the name of the user whose crontab is to be
74tweaked.  If this option is not given,
75.Nm
76examines "your" crontab, i.e., the crontab of the person executing the
77command.  Note that
78.Xr su 1
79can confuse
80.Nm
81and that if you are running inside of
82.Xr su 1
83you should always use the
84.Fl u
85option for safety's sake.
86.It Fl l
87Display the current crontab on standard output.
88.It Fl r
89Remove the current crontab.
90.It Fl e
91Edit the current crontab using the editor specified by
92the
93.Ev VISUAL
94or
95.Ev EDITOR
96environment variables.
97The specified editor
98.Em must
99edit the file in place;
100any editor that unlinks the file and recreates it cannot be used.
101After you exit
102from the editor, the modified crontab will be installed automatically.
103.El
104.Sh SEE ALSO
105.Xr crontab 5 ,
106.Xr cron 8
107.Sh FILES
108.Bl -tag -width /var/cron/allow -compact
109.It Pa /var/cron/allow
110.It Pa /var/cron/deny
111.El
112.Sh STANDARDS
113The
114.Nm
115command conforms to
116.St -p1003.2 .
117This new command syntax
118differs from previous versions of Vixie Cron, as well as from the classic
119SVR3 syntax.
120.Sh DIAGNOSTICS
121A fairly informative usage message appears if you run it with a bad command
122line.
123.Sh AUTHORS
124.An Paul Vixie Aq paul@vix.com
125