PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Using strictly PHP is there a reliable method for detecting/updating cron? I want to show a message indicating whether it's enabled or not as my application needs cron functionality.
Also, if cron is not available (shared hosts, etc) I would like to check for the possibility of using CLI to carry out the actions instead. Is there a php.ini setting which I can check that will tell me where and whether or not CLI is possible?
Hockey wrote:Couldn't i just rely on the error message returned when invoking a command that doesn't exist?
Then why did you make this topic in the first place?
There is no way to detect its existence without testing for it or trying to run it. Either way will return some result. Which one are you satisfied with?