Service & System

crontab

Schedule recurring tasks using cron daemon time-based job scheduler.

Synopsis

syntax
crontab [OPTION]... [FILE]

Examples

List your cron jobs
crontab -l
Edit cron jobs in default editor
crontab -e
List cron jobs for www-data
sudo crontab -l -u www-data
Set crontab from stdin
echo '0 2 * * * /backup.sh' | crontab -

Common options

FlagDescription
-eEdit current user's crontab
-lList current crontab
-rRemove current crontab
-uSpecify user

About crontab

The `crontab` command schedule recurring tasks using cron daemon time-based job scheduler. Service and system commands manage daemons, scheduled tasks, system boot, and shutdown operations.

Modern Linux distributions use systemd for service management, though some still support SysVinit scripts. Understanding these commands is essential for deploying and maintaining production services.

The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man crontab`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Service & System Commands

Other commands in the Service & System category

Related tools