|
Cron job script
|
/etc/cron.daily/logroate
|
|
Configuration file
|
/etc/logrotate.conf
|
|
Hourly or customized
|
a. /etc/cron.hourly
b. crontab (see below) |
cron.daily run? grep run-parts /etc/crontab
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12)
# | | | | .---- day of week (0 - 6) (Sun=0 or 7)
# | | | | |
# \* \* \* \* \* command to be executed
|
list crontab
|
crontab -l // Current user specific |
|
create crontab
|
crontab -e // Current user specific |
|
user's crontab file
|
// DON'T edit directly
CentOS:/var/spool/cron/$user Ubuntu /var/spool/cron/crontabs/$user |
|
system-wide crontab
|
// Username field is required
/etc/crontab |
# do daily/weekly/monthly maintenance# min hour day month weekday command*/15 * * * * run-parts /etc/periodic/15min0 * * * * run-parts /etc/periodic/hourly0 2 * * * run-parts /etc/periodic/daily0 3 * * 6 run-parts /etc/periodic/weekly0 5 1 * * run-parts /etc/periodic/monthly
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.