Can we configure cron job’s time interval through PHP script, so that the time interval should not be set manually, but through a PHP script, whether it takes time interval from Database or fixed (but from within the PHP code).
Thanks in advance
Can we configure cron job’s time interval through PHP script, so that the time
Share
I think it is much better to let your application control the frequency of events instead of the cronjob. Let the cronjob run a certain action of your application every minute. The action then for example checks a database table named cronjobs and runs the jobs marked for running by either a frequency number or a timestamp.
If you do it like this, you can add new jobs programmatically from everywhere, e.g. via an cronjob interface. The solution is easier to maintain, to test and to document.