Magento ver.

In my Cpanel I have 2 cron jobs set to run */5 * * * *.

/usr/local/bin/ea-php56 /home/myusername/public_html/cron.php -mdefault >/home/myusername/public_html/var/log/myjob1.log

/usr/local/bin/ea-php56 /home/myusername/public_html/cron.php -malways >/home/myusername/public_html/var/log/myjob.log

If I just create the cron jobs in Cpanel nothing happen. I then have to run the same commands using SSH. Only then do they start.

For some reason, my cron jobs turn off around 00:00 but not every night. Sometimes it goes 2-3 days working. Once it turns off, it turns off around the same time and I have to repeat the SSH steps.

The first time I noticed it was Since then I have been trying to trouble shoot.

Any help with this would be greatly appreciated.

enter image description here

1 Answer 1


I'd avoid using cPanel for your crons, since you have SSH access to your server (As you're running the commands manually) then you can add them directly to the cron running on the server. Using crontab -e you can create new cronjobs on the server and you can add your crons there. Make sure you're sudo'd to the web user when adding a new crontab so that they run as the correct user.

*/5 * * * * /usr/local/bin/ea-php56 /home/myuser/public_html/cron.php -mdefault >/home/patch/public_html/var/log/myjob1.log

*/5 * * * * /usr/local/bin/ea-php56 /home/myuser/public_html/cron.php -malways >/home/patch/public_html/var/log/myjob.log

Further suggestions

I can see you're using cron.php but you have AoE Scheduler installed, so you should use scheduler_cron.sh through /bin/bash instead. Example:

*/5 * * * * /bin/bash /home/myuser/public_html/scheduler_cron.sh -mdefault >/home/patch/public_html/var/log/myjob1.log

Build in a test flag to ensure crons don't run when a maintenance.flag is up (Your site is in maintenance mode). Example:

*/5 * * * * ! test -e /home/myuser/public_html/maintenance.flag && /bin/bash /home/myuser/public_html/scheduler_cron.sh -mdefault >/home/patch/public_html/var/log/myjob1.log

Hope that helps!

  • No problem! Did this help solve your issue? Commented May 11, 2018 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.