Good day is there a way in codeigniter using cronjob that i will execute a process in controller like this in my localhost
<?php
class Tools extends CI_Controller {
public function message($to = 'World')
{
echo "Hello {$to}!".PHP_EOL;
}
public function index() {
echo "hoy";
}
}
then i will create a file for the output of that using cronjob then i will pass it to my cpanel file ?
full example
24 09 * * * php /var/www/codeigniter_folder/index.php tools message > ~/Desktop/output.php
instead of sending the output.php to my desktop i will send it to my cpanel file manager.
thank you in advance