I am trying execute a cronjob every minute, but none work in the following ways:
shell_exec('* * * * * php http://www.example.com/cronJobs/CronJob.php >> /dev/null');
shell_exec('* * * * * /usr/bin/curl http://www.example.com/cronJobs/CronJob.php.php');
shell_exec('* * * * * wget http://www.example.com/cronJobs/CronJob.php.php');
The other question is about how execute a especific function of Cronjob.php
and pass some params
I use Codeigniter framework and I don't know if is neccesary do some configuration, but the tests outside the framework also fail.
Edited: Only is neccesary to edit crontab file and cron engine will execute automatically the cronjobs. I have found a tutorial to make and use a PHP class to manage crontabs: http://net.tutsplus.com/tutorials/php/managing-cron-jobs-with-php-2/