Wednesday, August 29, 2018

how to use crontab [linux]

* listing current crontab:
crontab -l

* editing crontab:
crontab -e

* example (once every 1st day of month):
0 0 1 * * shell_command_here

* special strings:
string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".
 



https://www.twiceweb.net/board/view/software/8