I have a cron job set up to run the cron.sh
file every 5 minutes, as per the installation guide. I have checked the server's cron log history and it is correctly running the job on schedule.
I added file_put_contents('cronlog.txt', date('c') . "\n", FILE_APPEND);
to the end of the try
block in cron.php
to verify, but it's logging two identical dates every 5 minutes, like cron.php
is calling itself recursively.
Is this normal behaviour? If not, any ideas as to what could cause such strangeness?
Best Answer
On newer versions this is expected. If you take a look at
cron.php
this part would get executed:which then loops through
cron.sh
to call thecron.php
again two times. It gets executed once in always mode and another time as defaultFurther reading http://davidalger.com/development/magento/a-new-breed-of-cron-in-magento-ee-1-13-2/