crontab
SystemFundamentals In real LinuxSchedule recurring jobs
Name: crontab = cron table; cron comes from Greek chronos (time)
This command needs a real Linux system; you can practise it in real Linux mode.
Description
crontab edits and lists your scheduled jobs, which the cron daemon runs on time. Each line is a job: five fields for minute, hour, day of month, month and weekday, then the command; 0 2 * * * means 02:00 daily.
cron runs jobs with a minimal environment (a short PATH), so use full paths and redirect output to a log.
Syntax
crontab [OPTION]...Common options
| -e | Edit your jobs |
| -l | List your jobs |
| -r | Remove all your jobs |
| -u USER | Work on another user’s table (needs root) |
| 分 时 日 月 周 | Schedule fields, e.g. 0 2 * * * is 02:00 daily |