Crontab Example

# m    h  dom mon dow   command
  *      *   *   *   *  php -q /path/to/script1.php
  */5   *   *   *   *  php -q /path/to/script2.php
  */7   *   *   *   *  php -q /path/to/script3.php
  2      0   *   *   *  php -q /path/to/script4.php
 13     3   7   *   *  php -q /path/to/script5.php

Above is probably one of the most complicated crontabs I’ve ended up with.

- Script 1 is being run every minute.

- Script 2 every 5 minutes and 3 every 7 minutes.

- Script 4 runs every day 2 minutes past 12 pm.

- Script 5 runs 13 minutes past 3 am the 7th every month.

Why the odd numbers?

- I like to have as few things being run at exactly the same time as possible.


Related Posts

Tags: ,