Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 470 Bytes

77.schedule.md

File metadata and controls

31 lines (27 loc) · 470 Bytes

One-time scheduled tasks: at

at 18:31 
at> /usr/bin/echo hello > /tmp/hello.txt
at> <EOT>

Ctrl + D : submit
atq : query

Periodically scheduled tasks

cron
crontab -e
crontab -l
/var/log/cron
/var/spool/cron/
*   *    *   *     *    command
min hour day month week command

Delayed scheduled tasks

/etc/cron.d/0hourly
/etc/anacrontab

Scheduled task lock: flock

flock -xn "/tmp/f.lock" -c "/root/a.sh" # exclusive lock