I am trying to run different scripts depending on what date it is, but im not 100% sure on how to go about it, basically what I am trying to do is :
A cron script runs every day and calls a php file on the server, in the php file I need to put something like :
run everyday.php every day
run everymonday.php every Monday
run firstmondayofthemonth.php on the first Monday of each month
so I need to check when the date is equal to each of the 3 and run that script then, but im not sure what command in php is best for this ?.
Well, if you have to do it with php (alternative would be to just create 3 cronjobs and configure cron) then this might give you an idea:
You need to adapt the code of course, for example replacing the run-thing by something that suits your environment. Could be include, execute or an http request,…