Magento 1.9.1 Cron Job Not Working

Author: Zeeshan Arshad     2641     10/16/2015

Estimated reading time: 1 minute, 30 seconds

I was recently invited to troubleshoot an issue of Magento 1.9.1 that was related to order confirmation email were not receiving. I worked around this and figured it out after various testings and research.

Problem: Magento Cron Job Not Working - OR - Magento Order Confirmation Emails Are Not Going

Problem Solving Notes:

1. First test with a simple php mail() and make sure that emails are going through direct script or not.
- If email is not being sent, issue is with your host.

2. Then, create a cronjob via your control panel and point to that mail() php file and see if the cronjob is being fired or not. If it does then you will surely receive an email.
- If you did not receive email via cronjob, then use correct cronjob command fomrat supported by your host until it runs your test php file.

These above two steps will confirm that email and cronjobs on the hosting server are perfectly fine or not. If these two are OK, then it means the issue only remains with Magento now.

Solution 1: (solved our issue)

Go to System -> Configuration -> ASCHRODER EXTENSIONS -> SMTP -> Queue Configuration -> Queue Usage -> Never

Solution 2: (cron_schedule table started to work)

You may be affected by a Magento bug then. Open cron.php in the root directory of Magento and look for (line 47):
$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

After this line, add:
$isShellDisabled = true;

Solution 3:

Check this wiki article on setting it up. There are valuable pointers to help you with issue.

Did any of the above solution worked for you? If yes, then share your experience with me :)

Was this topic helpful?

Subscribe YouTube Channel

Zeeshan Arshad is a multi-services (technical & spiritual) provider with extraordinary track record of success.

Feel free to contact him for your problems if you're looking for a problem solver.