Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 418 Bytes

note_2016-09-22_22-37-32_cron.md

File metadata and controls

19 lines (10 loc) · 418 Bytes

Utiliser cron pour automatiser des tâches

Editer les tâches:

$ crontab -e
$ sudo crontab -e

Activer les logs dans un fichier séparé:

$ vim /etc/rsyslog.conf

cron.*                          /var/log/cron.log

$ /etc/init.d/rsyslog restart

Logger une commande cron:

* 4 * * * CLEANER_BASIC_AUTH='xxxx' /opt/image-cleaner/node_modules/image-cleaner/index.js >> /var/log/docker-image-cleaning.log 2>&1