Magento Forum

   
Newsletters and cron
 
mytex
Jr. Member
 
Total Posts:  19
Joined:  2008-11-12
 

Hi,
I hope someone can advise me by answering a quick question.

I am having problems in sending my newsletters.  I can set them up OK and queue them but then they just sit there doing nothing!

I have read on other threads about running them manually by going to: http://www.mydomain/magento/index.php/admin/newsletter_queue/sending (in my case) and this works fine.  The newsletter gets sent and all is OK.

I guess that going to this address runs the cron job manually.

My question is, how do I automate this process?  I have everything set up in system>configuration>system in the admin for the cron but it doesn’t seem to run.  Do I need to set it up in my control panel for my hosting provider too?  If so, is there a particular syntax I should use to set up the job?

Thanks for any advice.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mytex
Jr. Member
 
Total Posts:  19
Joined:  2008-11-12
 

Hi again,
anybody have any thoughts on this?  I’d just like to get my newsletters working.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mytex
Jr. Member
 
Total Posts:  19
Joined:  2008-11-12
 

One last bump on this to see if I can get any responses.  Is newsletter functionality working fine for everyone else then?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

I had same problem, and it was resolved recently.
You will solve it quick, you just need to do couple simple things.
1. Ask your host server for correct command line to run cron job on the server.
2. Open your host server panel and create cron job.

Now more details:
command line for cron job exist of couple parts: left part where you write path for some libraries (this is what you should ask your host server guys) and right part where you write path to your cron file.

Right part is easy, it looks like http://youdomainname.com/cron.php
if your store in a root of your domain. If it is in a folder magento it will look like http://youdomainname.com/magento/cron.php

Left part can look something like /usr/bin/mlget -q -O /dev/null
so you need to ask host server guys about that.

So probably whole command line will look like /usr/bin/mlget -q -O /dev/null http://youdomainname.com/cron.php

After you will know your correct command line to cron file open your panel on your host server and find somewhere Cronjobs
There you need to create cronjob where you will have options to select how often you want run a cron job.
Also you will need to enter there your command line.
Save it and life would be much easier.

Good luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mytex
Jr. Member
 
Total Posts:  19
Joined:  2008-11-12
 

Thanks Oldgamer for your responce.  I will raise a ticket with my hosting company and give it a go.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mytex
Jr. Member
 
Total Posts:  19
Joined:  2008-11-12
 

Thanks again oldgamer.  This is now sorted.

In case it helps anyone else, the curl command to get this working for me was:

“curl http://www.mydomain.co.uk/magento/cron.php 2>&1;>/dev/null”

[NOTE: There is a semi-colon which keeps appearing in the line above which I can’t get rid of - whenever I submit the post, it’s there again!!!.  It should not be in the curl command.]

I set it to run every 15 mins and it seems to work fine now. smile

I also found this site useful for setting up the schedule on my plesk control panel:

http://www.adminschoice.com/docs/crontab.htm

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

Glad you worked it out!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top