Hi all,
i need to call a method of my controller by cli from a cronjob.
i created my controller, i setted the
to my controller and i access to my config using $config = new \Config\Myconf(); but i can't print log messages using log_message();
Code:
Cronjob:
# m h dom mon dow command
0 21 * * * /usr/bin/php8.1 /var/www/telegram/src/public/index.php VolleyRinsMedeBot loadCalendario prima
[code]
$routes->cli('/volley-rins-mede', 'VolleyRinsMedeBot::loadCalendario');
Code:
My controller method
public function loadCalendario($squadra)
{
log_message('info', 'Method: loadCalendario('.$squadra.')');
helper('filesystem');
[....]
}
}
Are there any reasons why log_message not works?
thank you