php - Calling a Codeigniter controller from cronjob -


i have created cron job cpanel. command is

php /home/userdir/www/index.php messages test 

the controller messages , method test inserts record in temporary table.

when run following command prompt on laptop running windows, runs fine.

php c:/wamp/www/project/index.php messages test 

this works perfectly.

however, on hosted server running linux, mail server has html home page. not go messages->test method.

please help.

use:

php index.php welcome show

as command in crontab. e.g.:

0 * * * * php /home/userdir/www/index.php messages test

or

0 * * * * /usr/local/bin/php /home/userdir/www/index.php messages test

or

0 * * * * wget http://domain.com/messages/test

http://www.codeigniter.com/user_guide/general/cli.html


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -