crontab
and Level, command
Syntax
crontab [-e | -l | -r] command
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
-e |
|
Common | |
-l |
|
Common | |
-r |
|
Common | |
-u |
crontab | |
Common |
Examples
()
crontab -e
crontab -l
2
0 2 * * * /opt/backup.sh
5
*/5 * * * * curl -s http://localhost/health
9,
0 9 * * 1-5 /opt/report.sh >> /var/log/report.log 2>&1
1 30
0 0 1 * * find /tmp -mtime +30 -delete
Tips
- : (0-59) (0-23) (1-31) (1-12) (0-7, 0 and 7)
- cron and shell,
- Tips: >> /tmp/cron.log 2>&1
- crontab.guru cron