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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -