I have never seen this problem before, and I am pretty confused. I have 3 cron jobs that execute PHP code through CakePHP's console system. All 3 jobs have been running for months with no problems, and continue to run. The weird problem is that the output from these cron jobs is always the same thing, yet when I run the code manually it is the correct updated output. I log the output of each job into txt files, so that I can review the timestamps and outputs.
Here is the output of one of the jobs from the txt file (that ran July 5th 12:30):
Welcome to CakePHP v2.1.2 Console
---------------------------------------------------------------
App : app
Path: /var/www/html/app/
---------------------------------------------------------------
- Calculating stats
- 79 players calculated
---------------------------------------------------------------
CalculateStats complete!
Shell took 9.4434700012207 seconds
And here is the output when I run the shell manually:
Welcome to CakePHP v2.1.2 Console
---------------------------------------------------------------
App : app
Path: /var/www/html/app/
---------------------------------------------------------------
- Calculating stats
- 188 players calculated
---------------------------------------------------------------
CalculateStats complete!
Shell took 6.4958961009979 seconds
When the job runs again (every 4 hours), the output will be the same as the 1st example. It's as if the job is stuck in a frozen state and I am not too sure how to fix it.
I've disabled caching, checked PATH and made sure there is a trailing newline in the crontab. All jobs (and myself) are also ran as the root user. For reference, here is my crontab.
0 0-23/4 * * * /var/www/html/lib/Cake/Console/cake -app /var/www/html/app/ calculate_stats > /root/calculate_stats.txt
30 0-23/4 * * * /var/www/html/lib/Cake/Console/cake -app /var/www/html/app/ aggregate_votes > /root/aggregate_votes.txt
0 15 * * 3 /var/www/html/lib/Cake/Console/cake -app /var/www/html/app/ game_sprint_reset > /root/game_sprint_reset.txt
Any ideas?