I want to schedule a task which is a controller method in MVC CodeIgniter. Also, I want to add the option in my web application for the admin to change the schedule instead of working around windows task scheduler manually. I found some examples for PHP Web Form scheuler but not for MVC CodeiIgniter! Could you please guide me in this regard?
If my question is not clear please let me know which part you need more clarification!
Many thanks in advance,
First of all scheduling a task is a OS base Operation, so you cannot control it through your application unless you have full rights to your server, however there are some ways where you can achieve this Check this article it will help you about how CI controls the cron job.
If you want to change/create the time of the cron job through your application then you can use exec function which will execute your passed command in the shell of windows but remember this function will only work when your hosting provider has enabled it or you have rights to this function and this answers will tell how you can use schedule task (CronJob) on Windows through command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With