I need to run a query by using Cron job in CodeIgniter. How to create a Cron job with below mentioned details(weekly, 7 weeks, repeat on, and time). Here I attached the screenshot for your reference.
Please suggest around this.
Thanks in advance!
There is no build in cron function in codeigniter. What you can do is:
Create a cron on your server, which is calling a controller every x-time, e.g. every 5 minutes.
You create a new controller, e. g. scheduler, which is called by the server cron. In this controller you handle the cron request and checking the execution time.
The only difficult part is to calculate the times from a user input.
A not well written but working PHP solution is here: PHPScheduler
It is not codeigniter, but you can use this as a starter.
Trigger a cron job.
I have added following images , refer them
I have added a cron which runs once in a day. and in your server, it looks like this.