планирование_выполнения_заданий_в_linux

This is an old revision of the document!


Планирование выполнения заданий в Linux

Примеры периодических задач

Сервис cron

# crontab -e

# crontab -l
# m h  dom mon dow   command
*/5 * * * * test `top -b -n 1 | grep Cpu | cut -d':' -f2 | cut -d. -f1` -gt 60 && ( date; ps awux ) >> /tmp/ps_cpu_hi.log
5-59/10 * * * * /etc/backup.sh

# crontab -r

Скрипт run-parts

# cat /etc/crontab
...

# !!!! Don't work with .sh !!!!
# cp /root/backup_conf.sh /etc/cron.daily/backupconf

# run-parts --report /etc/cron.daily

Система anacron

# cat /etc/crontab

# apt install anacron

# man anacrontab

# cat /etc/anacrontab
...

# start anacron

# ls /var/spool/anacron
планирование_выполнения_заданий_в_linux.1633343247.txt.gz · Last modified: 2021/10/04 13:27 by val