---
name: "crontab"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/crontab"
---

# crontab(1)

maintain crontab files for individual users

## NAME

**crontab** – maintain crontab files for individual users

## SYNOPSIS

**crontab** \[**-u** *user*\] *file*

**crontab**\[ **-e** \| **-l** \| **-r**\] \[**-u** *user*\]

## DESCRIPTION

**crontab** is the program used to install, deinstall, or list the tables used to drive the [cron(8)](/cron/8.md) daemon. Each user can have their own [crontab(5)](/crontab/5.md), and though these are files in */var/cron/tabs*, they are not intended to be edited directly.

The first form of this command is used to install a new crontab from some named file, or standard input if the pseudo-filename ‘-’ is given.

If the */var/cron/cron.allow* file exists, then you must be listed therein in order to use **crontab**. If the */var/cron/cron.allow* file does not exist but the */var/cron/cron.deny* file does exist, then you must *not* be listed in the */var/cron/cron.deny* file in order to use **crontab**. If neither of these files exists then only the super user will be allowed to use **crontab**. *NOTE*: if they exist, */var/cron/cron.allow* and */var/cron/cron.deny* must be readable by group crontab. If **crontab** is unable to read the files, users will not be allowed to use **crontab**.

The options are as follows:

- **-e**

  Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified [crontab(5)](/crontab/5.md) will be installed automatically.

- **-l**

  Causes the current crontab to be displayed on standard output.

- **-r**

  Causes the current crontab to be removed.

- **-u** *user*

  Specifies the name of the user whose [crontab(5)](/crontab/5.md) is to be edited. If this option is not given, **crontab** examines “your” [crontab(5)](/crontab/5.md); i.e., the crontab of the person executing the command. Note that [su(1)](/su/1.md) can confuse **crontab** and that if you are running inside of [su(1)](/su/1.md) you should always use the **-u** option for safety's sake.

## ENVIRONMENT

- EDITOR, VISUAL

  Specifies an editor to use. If both EDITOR and VISUAL are set, VISUAL takes precedence. If neither EDITOR nor VISUAL are set, the default is [vi(1)](/vi/1.md).

## FILES

- */var/cron/cron.allow*

  list of users allowed to use crontab

- */var/cron/cron.deny*

  list of users prohibited from using crontab

- */var/cron/tabs*

  directory of individual crontabs

## SEE ALSO

[at(1)](/at/1.md), [crontab(5)](/crontab/5.md), [cron(8)](/cron/8.md)

## STANDARDS

The **crontab** utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

The flag \[**-u**\] is an extension to that specification.

The flag \[**-e**\] is marked by IEEE Std 1003.1-2008 (“POSIX.1”) as being optional.

The cron.allow/deny mechanism is marked by IEEE Std 1003.1-2008 (“POSIX.1”) as being an X/Open System Interfaces option.

## AUTHORS

Paul Vixie ⟨*vixie@isc.org*⟩
