I have a php script that I have (trying) to run on a cron job. Basically, this script will output a log file to the same directory in which it lives. When I
execute the script from within the directory, it executes fine and updates the log file. that is using the command from the shell:
Code:
php -f expiration_check.php
But, when I execute that from a cron job, It seemingly does its job, but doesn't update the log file as when I execute from the directory it is in. Here is the cron command:
Code:
/usr/local/bin/php /home/my_web_user/non_public/expiration_check.php
I have the non_public directory in the user's root directory, not the server root. So, why does it not update the log file with that cron command? Any ideas? The times on the files seem to change, however, with the cron run, just not the text inside. But I know it is working in the script, because I get a sucessful execute from the shell, in that directory?
Do I have to specify the full path in the script for the log file as well? That is one thought. Any ideas?
Thanks,
CharlesH