cron job via cli codeIgniter v3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: cron job via cli codeIgniter v3 (/showthread.php?tid=78850) |
cron job via cli codeIgniter v3 - latristef - 03-18-2021 Hello, I bought a marketplace module pre-developed with codeIgniter. I am stuck on a very important point on which you could perhaps help me. Indeed, regarding cron jobs, codeIgniter provides for the call via the http protocol. For various reasons (in particular the need to call scripts in python in my cron), I want to be able to launch my cron via the cli (ie from the command line). I looked at the codeIgniter documentation but the example given does not work for me. This is due to the fact that I bought a pre-developed module and there are additional roadblocks.. I have created a cli.php file at the root as follow Code: #!/usr/bin/php Code: <?php defined('BASEPATH') OR exit('No direct script access allowed'); when typing in the command line php cli.php cron_controller update_sitemap I get the following error : Invalid License Code in my Common.php file there is a function : Code: if (!function_exists('res_lcs_common')) { but it works well - when calling with bibelotandco.fr/cron_controller/update_sitemap I have to pass through this error with cli but have no idea to do that. Thank you for your help |