Това е стара версия на документа!
0 1 * * * /path/to/cgi-bin/yourscript.cgi | | | | | | | | | |________________ day of week (0 - 6) (Sunday=0) | | | |__________________ month of year (1 - 12) | | |____________________ day of month (1 - 31) | |______________________ hour of day (0 - 23) |________________________ minute of hour (0 - 59)
examples
30 0 1 1,6,12 * /path/to/cgi-bin/yourscript.cgi – 00:30 Hrs on 1st of Jan, June & Dec.
0 20 * 10 1-5 /path/to/cgi-bin/yourscript.cgi – 8.00 PM every weekday (Mon-Fri) only in Oct.
0 0 1,10,15 * * /path/to/cgi-bin/yourscript.cgi – midnight on 1st ,10th & 15th of month
5,10 0 10 * 1 /path/to/cgi-bin/yourscript.cgi – At 12.05,12.10 every Monday & on 10th of every month
*/20 * * * * /path/to/cgi-bin/yourscript.cgi – run yourscript.cgi every 20 minutes
To collect the cron execution log in a file:
30 18 * * * rm /home/someuser/tmp/* > /home/someuser/cronlogs/clean_tmp_dir.log
За тестване на конкретен execution тайм може да се ползва: https://crontab.guru/