cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9.1 Cron-E-Mail-Issue

Magento 1.9.1 Cron-E-Mail-Issue

There have been different posts upon similar issues, that sorrily couldn’t help me further.

 

The situation:

- Magento 1.9.1 isn’t processing sales e-mails, although I arranged crontab to be executed every 5 minutes via SSH

- E-Mails are not sent out, table cron_schedule is empty, table core_email_queue is filled, but field processed_at is empty

- To the E-Mail address I deposited I get an error-email every 5 minutes with this content:

/direct/path/to/the/store/cron.sh: line 29: syntax error: unexpected end of file

- Line 29 in cron.sh is an empty line

 

More Information about this:

I originally developed the shop under Windows on a local xampp-environment and then transferred it to a linux-hosting environment. Everything works fine, it is currently running on a test-URL under live conditions.

I set up crontab like this:

MAILTO=info@mywebsite.com

*/5 * * * * /bin/sh /direct/path/to/the/shop/cron.sh

 

Trying "dos2unix cron.sh" was no solution, but even stopped sending out the error message additionally.

 

Has anyone similar experiences or an idea how to fix this issue? Any hint is highly appreciated.

10 REPLIES 10

Re: Magento 1.9.1 Cron-E-Mail-Issue

@linielux

 

 

For this, try to setup the cron in the server and give the path of magento cron.php file avilable in magento root folder.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Magento 1.9.1 Cron-E-Mail-Issue

Thanks for this proposal, but this doesn't work, too. Even loading cron.php in the browser does not cause E-Mails to be sent out. Could it be a question of special settings in System -->Mail Delivery Settings? What do you insert into the field "Server", if the shop is running on a shared hosting environment., should the field be empty or filled with the SMTP-servername?

Re: Magento 1.9.1 Cron-E-Mail-Issue

I think you must check the mail log. Before that you try with a simple php mail sending script in the root path and run it. If that throws an error then there is some configuration with the mail server settings that prevents. Look at this link for checking the log http://serverfault.com/questions/59602/where-to-check-log-of-sendmail The path changes according to the mail server installed. May be experts might help more.

Re: Magento 1.9.1 Cron-E-Mail-Issue

@linielux

 

To check the root of the issue you can try subscribing the newsletter and check wheater the emails are being sent or not.

Also check if you have setup cron. This might be the issue. http://magecomp.com/blog/how-to-setup-a-cron-job-in-cpanel-for-magento/

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Magento 1.9.1 Cron-E-Mail-Issue

Thank you for the different proposals. But after a lot of research I found out that it is a specific server issue.

For all customers of 1and1 shared hosting some tipps, which gets the cron-job running in the above mentioned setting:
- Set rights 755 for cron.sh and cron.php on the server
- Explicitly replace within cron.sh
PHP_BIN=`which php` by PHP_BIN='/usr/local/bin/php5.5', if the installed php-version is 5.5, also set the other form of single quotation marks
- */5 * * * * /bin/sh /direct/path/to/the/shop/cron.sh &> /dev/null
is the right command to avoid error messages
With these settings the problem was solved.

Re: Magento 1.9.1 Cron-E-Mail-Issue

I also use 1and1 shared hosting. Before the SUPEE-6788 patch, I set up my cronjob using wget with no problems. After the patch, my cron stopped working and found that cron.php cannot be called via wget/cron.php anymore. I set up cron.sh and still no luck. 

My set up my cron.sh along with the other tips you mentioned:

*/5 * * * * /bin/sh /kunden/homepages/25/d7943798795/htdocs/mymagento/cron.sh &> /dev/null

 

I use Aoe_Scheduler and am receiving the message 'Last heartbeat is older than one hour. Please check your settings and your configuration!' Nothing I am doing seems to work and my order confirmation emails are sent out only when I manually select all available tasks in Aoe Scheduler and select "Run Now" in the drop down. It runs it once and the remaining tasks that are scheduled remain pending.

 

Are you having issues after the patch? Any clues as to what could be the issue?

 

 

 

 

Re: Magento 1.9.1 Cron-E-Mail-Issue

Sorry,

 

I didn't install this patch. So this is likely to be the issue.
So if you have checked the two additional tipps (rights and path to php-Version) I have no solution for your current problem.

 

Bernhard

Re: Magento 1.9.1 Cron-E-Mail-Issue

Thanks Bernhard. After I had applied the patch, it broke the cronjob. And as you can imagine, 1and1 tech is not very helpful. They couldn't tell the me correct path on how to set the cron.sh correctly. Two days spent on this and still at a loss. Thanks again, I appreciate your reply.

Re: Magento 1.9.1 Cron-E-Mail-Issue

Hello. i have the same issue. Magento 1.9.1 and cron issue after SUPEE-6788 patch.

If you have solved, please, can you post exactly all the operations you have made? Thanks, the same i will do if i solve instead.

Regards.