I am running a php script using cron. The name of the file is : PriceChecker.php . This is my cron script
# m h dom mon dow command
0 07,11,16,20 * * * php /var/www/mainsite/PriceChecker.php
* * * * * /var/www/mainsite/pricecheck.sh
The shell script is:
#!/bin/bash
php PriceChecker.php >logger.log
The first line is the original. The second is for testing I have tried various variations including: /usr/bin/php /var/www/mainsite/PriceChecker.php
If I log the out in the cron php /var/www/mainsite/PriceChecker.php > logfile.log
The logfile is created, but is empty
PriceChecker.php, at what lines does the code break? And what is written in the error log?/usr/bin/php- executewhere phpto figure out what to use). Reason is that typically cron offers very little PATH to the tasks it runs.