Monday, June 25, 2018

crontab examples



example:  to run a program every 5 minutes

*/5 * * * * /root/checkmotion/checkmotion.sh

https://crontab.guru/every-5-minutes 

https://crontab.guru/examples.html

crontab template

*/5      *       *       *       *
Minute   hour    day     month   day
                (month)         (week)


*           any value
,           value list separator
-           range of values
/           step values
@yearly     (non-standard)
@annually   (non-standard)
@monthly    (non-standard)
@weekly     (non-standard)
@daily      (non-standard)
@hourly     (non-standard)
@reboot     (non-standard)


to edit crontab;

export EDITOR=vi
crontab -e

(or editor of choice)

-30-

No comments:

Post a Comment