php - Execute CRON 2 and 3 times per month? -


i have following issue.
need run same script (with different args) in different 5 different dates.

  • 1x per month
  • 2x per month
  • 3x per month
  • 4x per month
  • every day

my current code:

1x month (run every month 1st day, 9:00)

0 9 1 * * php /script.php 1 

2x month (need setup cron)

? php /script.php 2 

3x month (need setup cron)

? php /script.php 3 

4x month (run every monday, 9:00)

0 9 * * 1 php /script.php 4 

every day (run every day, 9:00)

0 9 * * * php /script.php e 

crontab gives order of time values

to define time can provide concrete values minute (m), hour (h), day of month (dom), month (mon), , day of week (dow) or use '*'

you did not specify fixed day, i'll put sample data you.

this cron run every 1st , 15th @ midnight

0 0 1,15 * * /script.php 2 

this other every 1st,10th , 20th @ midnight

0 0 1,10,20 * * /script.php 3 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -