CodeIgniter 4 Tasks, Execute task in controller ? |
Hello,
I would like to know if it is possible to execute a cron task instantly from CI TASK (https://tasks.codeigniter.com/)? PS: My tasks work perfectly with PHP Spark Task... or via CRON on my live server. What I want to do: I have a task in my Tasks.php file: PHP Code: $schedule->call(static function () { But if I go into one of my controllers, for example, my Admin panel, in: PHP Code: public function index() { This works, but it does not execute the task; it just goes through the file, and here's what I have in var_dump/echo: Running Task... Completed Running Tasks Without actually executing the task in question... I do not see how to perform this action. Thank you for your help. Florian PHP Code: // only thing I can see in the list What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |