Welcome Guest, Not a member yet? Register   Sign In
SOLVED: Can't get my cronjob to run (yet)
#1

[eluser]carvingCode[/eluser]
Installed the cron.php bootstrapper. Made the change to 'CRON_CI_INDEX':

Code:
define('CRON_CI_INDEX', '/home/XXXX/public_html/dev/ci/index.php');

Entered the following into cPanel Advanced Cronjob tool:

Code:
/usr/bin/local/php -q /home/XXXX/public_html/dev/ci/cron.php --run=/upload_ctrl/get_daily_update_file/TRUE [log-file=/home/XXXX/public_html/dev/ci/uploads/log.txt]

cron.php is set to execute (777). Absolute paths used above are correct.

Have cron set to run every minute of every hour.

Nothing...

Anyone see a problem?
#2

[eluser]CroNiX[/eluser]
I see one issue and one potential issue. Your log file command is wrong. It shouldn't have brackets around it (in the example code that denotes its an optional parameter) and it should start with
Code:
"--"
just like the run parameter.

so just:
Code:
--log-file=/home/XXXX/public_html/dev/ci/uploads/log.txt

Second is make sure that the log.txt file exists and is writable.

Your cronjob log should be telling you this. Do you have it set to email you the result of the cron job in cPanel?
#3

[eluser]carvingCode[/eluser]
I keep getting 'no such file or directory' errors, seemingly on the path to 'php' on the host. I've tried every variation of the pathname I can think of with no luck. Will email host for assist.

Thanks.
#4

[eluser]CroNiX[/eluser]
If you run a phpinfo() it will tell you the location too (look at include path).

From the command line if you have ssh access: "which php"
#5

[eluser]carvingCode[/eluser]
Once I got the correct path to php on my hosted server, the cronjab ran just fine.




Theme © iAndrew 2016 - Forum software by © MyBB