cron doesnt run correctly my php file

cadrogui

Registered
Jan 2, 2012
1
0
51
cPanel Access Level
Website Owner
hello, i have a serius problem with cron, when i run my php file manually from shell runs fine, but when i run from cron runs poorly, ive made a bash script to do this job.

this is a extract of the code:

-rit )
cd /home/legalint/public_html/robot/
php -f robot_LegalInt.php
;;

so, when i call the script from shell robot -rit, says

---------------------------------------------------------
C-4370-2009 | (Causa 1 de 291)
Bytes Actuales: 480924
Bytes en Bd: 480924
CABELLO INMOBILIARIA BOS
2 Juzgado Civil de Chillan
------------------------------------------------------------

when i run this comand (robot -rit) from cpanel cron job, says

---------------------------------------------------------
C-4370-2009 | (Causa 1 de 291)
Bytes Actuales:
Bytes en Bd: 480924
CABELLO INMOBILIARIA BOS
2 Juzgado Civil de Chillan
------------------------------------------------------------

the Bytes Actuales: is empty...

why works when i ran from shell directly, and doesnt work from cron?

thanks
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
Hello,

As what user you run it as cron; do you use the same user to try the script using command line? If not, su to the user you are using to run the cron and execute the script again from that user's shell.

Thank you,
Nibin.