I am developing an internal system for a company with PHP using Zend framework. I need one of its functions to execute on a time specified by user.
My research on this matter found me several ways of doing this using CPanel Cron jobs and setting up scheduled tasks on the server. But in this scenario, I don’t have a CPanel and I already use scheduled tasks. But my challenge is to provide an interface for the user to specify the time to trigger the function.
cron is an external program, you can call it from PHP via exec()
or shell_exec()
(their only difference is how they handle output).
You’ll probably want to build a friendly user interface around it, and be extremely strict with what ends up getting executed, but that’s about it.