xref: /netbsd/external/bsd/cron/dist/crontab.1 (revision b8f08142)
1.\"	$NetBSD: crontab.1,v 1.3 2010/05/07 20:43:40 christos Exp $
2.\"
3.\"/* Copyright 1988,1990,1993 by Paul Vixie
4.\" * All rights reserved
5.\" */
6.\"
7.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
8.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc.
9.\"
10.\" Permission to use, copy, modify, and distribute this software for any
11.\" purpose with or without fee is hereby granted, provided that the above
12.\" copyright notice and this permission notice appear in all copies.
13.\"
14.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
15.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16.\" MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
17.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
20.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21.\"
22.\" Id: crontab.1,v 1.7 2004/01/23 19:03:32 vixie Exp
23.\"
24.Dd May 6, 2010
25.Dt CRONTAB 1
26.Os
27.Sh NAME
28.Nm crontab
29.Nd maintain crontab files for individual users (ISC Cron V4.1)
30.Sh SYNOPSIS
31.Nm
32.Op Fl u Ar user
33.Nm
34.Op Fl l
35.Op Fl r
36.Op Fl e
37.Sh DESCRIPTION
38.Nm
39is the program used to install, deinstall or list the tables
40used to drive the
41.Xr cron 8
42daemon in ISC Cron.
43Each user can have their own crontab, and though
44these are files in
45.Pa /var/cron ,
46they are not intended to be edited directly.
47.Pp
48If the
49.Pa /var/cron/allow
50file exists, then you must be listed therein in order to be allowed to use
51this command.
52If the
53.Pa /var/cron/allow
54file does not exist but the
55.Pa /var/cron/deny
56file does exist, then you must not be listed in the
57.Pa /var/cron/deny
58file in order to use this command.
59If neither of these files exists, depending on the compiled in settings,
60only the super user will be allowed to use this command,
61or everyone will be allowed to use this command.
62On
63.Nx
64everyone is allowed to use this command.
65.Pp
66The default maximum size for a crontab is 256 kilobytes, but this may be
67changed for all users on the system by putting the desired maximum size
68(in bytes) in the
69.Pa /var/cron/maxtabsize
70file.
71.Pp
72If the
73.Fl u
74option is given, it specifies the name of the user whose crontab is to be
75tweaked.  If this option is not given,
76.Nm
77examines
78.Dq your
79crontab, i.e., the crontab of the person executing the command.
80Note that
81.Xr su 1
82can confuse
83.Nm
84and that if you are running inside of
85.Xr su 1
86you should always use the
87.Fl u
88option for safety's sake.
89.Pp
90The first form of this command is used to install a new crontab from some
91named file or standard input if the pseudo-filename
92.Dq -
93is given.
94.Pp
95The
96.Fl l
97option causes the current crontab to be displayed on standard output.
98.Pp
99The
100.Fl r
101option causes the current crontab to be removed.
102.Pp
103The
104.Fl e
105option is used to edit the current crontab using the editor specified by
106the
107.Dv VISUAL
108or
109.Dv EDITOR
110environment variables.
111After you exit from the editor, the modified crontab will be installed
112automatically.
113.Sh SEE ALSO
114.Xr crontab 5 ,
115.Xr cron 8
116.Sh FILES
117.Bl -tag -width /var/cron/maxtabsize -compact
118.It Pa /var/cron/allow
119Optional list of users that are allowed to use
120.Nm .
121.It Pa /var/cron/deny
122Optional list of users that are disallowed to use
123.Nm .
124.It Pa /var/cron/maxtabsize
125Maximum size of
126.Nm
127.It Pa /var/cron/tabs/
128Directory containing the individual user crontab files, named after the user.
129files.
130Defaults to
131.Dv 256
132kilobytes.
133.El
134.Sh STANDARDS
135The
136.Nm
137command conforms to
138.St -p1003.2 .
139This new command syntax
140differs from previous versions of Vixie Cron, as well as from the classic
141.At V3
142syntax.
143.Sh DIAGNOSTICS
144A fairly informative usage message appears if you run it with a bad command
145line.
146.Sh AUTHORS
147.An Paul Vixie
148.Aq vixie@isc.org
149