1.\"/* Copyright 1988,1990,1993 by Paul Vixie 2.\" * All rights reserved 3.\" */ 4.\" 5.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 6.\" Copyright (c) 1997,2000 by Internet Software Consortium, Inc. 7.\" 8.\" Permission to use, copy, modify, and distribute this software for any 9.\" purpose with or without fee is hereby granted, provided that the above 10.\" copyright notice and this permission notice appear in all copies. 11.\" 12.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 13.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 15.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 18.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19.\" 20.\" $OpenBSD: crontab.1,v 1.28 2011/01/31 19:13:31 millert Exp $ 21.\" 22.Dd $Mdocdate: January 31 2011 $ 23.Dt CRONTAB 1 24.Os 25.Sh NAME 26.Nm crontab 27.Nd maintain crontab files for individual users 28.Sh SYNOPSIS 29.Nm crontab 30.Op Fl u Ar user 31.Ar file 32.Nm crontab 33.Oo 34.Fl e | l | r 35.Oc 36.Op Fl u Ar user 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. 43Each user can have their own 44.Xr crontab 5 , 45and though these are files in 46.Pa /var/cron/tabs , 47they are not intended to be edited directly. 48.Pp 49The first form of this command is used to install a new crontab from some 50named file, or standard input if the pseudo-filename 51.Sq Fl 52is given. 53.Pp 54If the 55.Pa /var/cron/cron.allow 56file exists, then you must be listed therein in order to use 57.Nm crontab . 58If the 59.Pa /var/cron/cron.allow 60file does not exist but the 61.Pa /var/cron/cron.deny 62file does exist, then you must 63.Em not 64be listed in the 65.Pa /var/cron/cron.deny 66file in order to use 67.Nm crontab . 68If neither of these files exists then only the super user 69will be allowed to use 70.Nm crontab . 71.Em NOTE : 72if they exist, 73.Pa /var/cron/cron.allow 74and 75.Pa /var/cron/cron.deny 76must be readable by group crontab. 77If 78.Nm 79is unable to read the files, users will not be allowed to use 80.Nm crontab . 81.Pp 82The options are as follows: 83.Bl -tag -width "-u userX" 84.It Fl e 85Edit the current crontab using the editor specified by 86the 87.Ev VISUAL 88or 89.Ev EDITOR 90environment variables. 91After you exit from the editor, the modified 92.Xr crontab 5 93will be installed automatically. 94.It Fl l 95Causes the current crontab to be displayed on standard output. 96.It Fl r 97Causes the current crontab to be removed. 98.It Fl u Ar user 99Specifies the name of the user whose 100.Xr crontab 5 101is to be edited. 102If this option is not given, 103.Nm 104examines 105.Dq your 106.Xr crontab 5 ; 107i.e., the 108crontab of the person executing the command. 109Note that 110.Xr su 1 111can confuse 112.Nm 113and that if you are running inside of 114.Xr su 1 115you should always use the 116.Fl u 117option for safety's sake. 118.El 119.Sh ENVIRONMENT 120.Bl -tag -width "TMPDIR" 121.It Ev EDITOR , VISUAL 122Specifies an editor to use. 123If both 124.Ev EDITOR 125and 126.Ev VISUAL 127are set, 128.Ev VISUAL 129takes precedence. 130If neither 131.Ev EDITOR 132nor 133.Ev VISUAL 134are set, the default is 135.Xr vi 1 . 136.It Ev TMPDIR 137Directory in which to place temporary files used by 138.Nm Fl e . 139If unset, 140.Pa /tmp 141is used. 142.El 143.Sh FILES 144.Bl -tag -width "/var/cron/cron.allow" -compact 145.It Pa /var/cron/cron.allow 146list of users allowed to use crontab 147.It Pa /var/cron/cron.deny 148list of users prohibited from using crontab 149.It Pa /var/cron/tabs 150directory of individual crontabs 151.El 152.Sh DIAGNOSTICS 153A fairly informative usage message appears if you run it with a bad command 154line. 155.Sh SEE ALSO 156.Xr at 1 , 157.Xr crontab 5 , 158.Xr cron 8 159.Sh STANDARDS 160The 161.Nm 162utility is compliant with the 163.St -p1003.1-2008 164specification. 165.Pp 166The flag 167.Op Fl u 168is an extension to that specification. 169.Sh AUTHORS 170.An Paul Vixie Aq vixie@isc.org 171