You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a php script I want to run once a month or every day, depending on the value of certain values in a database.
I have no problem getting the variables into scheduler.php, but can't seem to write a function that will accomplish the above.
I've tried various ways of using the function lines you present, but can't get the result I need. What is the best way to do this?
It's not clear from the instructions if I should chain the command all into one thing, but maybe that's the key, like this, which I've seen in another cron scheduler:
@jamminjames I think @rafaelmb got a point here, if you want to use a external variable in a Closure you have to specify it like the below
->when(function() use ($myExternalVariable) {
# ....
})
I have to be honest I haven't tried your code yet but the when method works so there is no reason why in you code it shouldn't. Can you try the suggested solution and see if that works for you now?
I have a php script I want to run once a month or every day, depending on the value of certain values in a database.
I have no problem getting the variables into scheduler.php, but can't seem to write a function that will accomplish the above.
I've tried various ways of using the function lines you present, but can't get the result I need. What is the best way to do this?
It's not clear from the instructions if I should chain the command all into one thing, but maybe that's the key, like this, which I've seen in another cron scheduler:
Thank you!
The text was updated successfully, but these errors were encountered: