Welcome Guest, Not a member yet? Register   Sign In
log_message and controller by cli
#1

(This post was last modified: 03-21-2022, 11:32 AM by codel074.)

Hi all,
i need to call a method of my controller by cli from a cronjob. 
i created my controller, i setted the
Code:
$route->cli() 
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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB