I'm trying to make a cronjob run in the CI, but I'm not getting it, this error appears:
Fatal error : Class 'CI_Controller' not found in /MeuCaminho/application/controllers/cron.php on line 4
>
PHP
<?php
class Cron extends CI_Controller{
//put your code here
public function index(){
$arq = fopen("teste_cron.txt", "a+");
fwrite($arq, "=======================TESTE CRONTAB======================================\n");
fwrite($arq, "O CronTab executou este código na Data/Hora: ".date("d/m/Y H:i:s")."\n");
fwrite($arq, "==========================================================================\n");
fclose($arq);
}}
PATH
php -q /home/user/public_html/caminho_completo/application/controllers/cron.php
Can anyone tell me how I can do it?