m h d M w /directory/command output
{m h d M w} specify the time/date and recurrence of the job
- m(inunte) h(our) d(ay) M(onth) (day of)w(eek)
- {/directory/command} specifies the location and comand you want to run
- {output} is a optional segment. It defines how system notifies the user of the job completion
- Use asterisk(*) to set every time in some position. Ex.: 7 * * * * (the command will be executed every minute 7 at any hour)
- Use comma(,) to separete individual values. Ex.: 7,14 * * * * (execute that twice per hour at minute 7 and 14)
- Use dash(-) to indicate a range of values. Ex.: 0 8-18 * * * (execute that once per hour from 8 to 18)
- Use forward-slash(/) to divide a value in steps. Ex.: */15 * * * * (execute that every fifteenth minute)
0 0 */5 * * docker system prune -f && docker image prune -fa
* * * * * echo TESTE_CRON >/dev/null 2>&1
Medium article about
1>/dev/null 2>&1
https://blomsmail.medium.com/linux-what-does-1-dev-null-2-1-actually-mean-14ebcc07bcdc