Cron job every three days

Run it every three days…

0 0 */3 * *

How about that?

If you want it to run on specific days of the month, like the 1st, 4th, 7th, etc… then you can just have a conditional in your script that checks for the current day of the month.

if (((date('j') - 1) % 3))
   exit();

or, as @mario points out, you can use date(‘k’) to get the day of the year instead of doing it based on the day of the month.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)