Error message when trying to send newsletter via cron job
-
I have set up a cron job with cPanel. I tried to send a newsletter as a test to 7 recipients (all email addresses of mine.)
Every time the cron is triggered, I receive an email stating:
cURL error: (47) Maximum (5) redirects followed
I’m totally lost as to this error message. My hosting provider told me to get in touch with the plugin developer (Email Subscribers).
When I send the newsletter immediately, then everything works fine. But right now I constantly keep getting these error emails. I somehow have to empty the queue manually I think? But then again, how can I get my cron job to work properly? I do not know what is wrong.
My list of email subscribers has 107 recipients now and it’s growing.
Who can help me out? Thanks in advance!
The page I need help with: [log in to see the link]
-
The only way to stop the emails from comning is to delete the cron job by using cPanel. But when I create the cron job again, the emails start coming again.
Apologies for the inconvenience.
Kindly allow me some time to check this use case on my end and get back to you soon.Of course. Hope to hear from you soon. In the meantime, I will delete the cron job and for the time being revert to sending email immediately. Thanks in advance!
(I have installed version 3.4.8)
I just tried the Cron method again. I tried sending a test email to only 7 recipients. Here’s the email I received:
Cron<https://brainvoyagermusic.com.transurl.nl/?es=cron&guid=gvhcxt-ndhxeg-jtchue-oeqswc-cpinby>(HTTP 301)
cURL error: (47) Maximum (5) redirects followed
My hosting provider told me that they couldn’t do anything for me and that I should get in touch with the plugin developer. See the afore mentioned topic.
They also told me that I can send 250 emails per hour and 500 emails per day, which is sufficient for me.
I have installed version 3.4.9 as soon as I got the notification in my dashboard last week.
-
This reply was modified 6 years, 11 months ago by
Brainvoyager.
Apologies for the delayed response.
Kindly use the following command:-wget –quiet “https://www.yourwebsite.com/?es=cron&guid=evnloh-eqotdy-fmswkp-oqwlgp-gbuzak”
Don’t forget to replace https://www.yourwebsite.com/?es=cron&guid=evnloh-eqotdy-fmswkp-oqwlgp-gbuzak with your own Cron URL of Email Subscribers.
Kindly try after you change the command and do let me know if it works for you.
Thanks for your response.
Unfortunately, cPanel does not accept your command. It does not accept the wget –quiet prefix.
I get the message: “URL invalid”.
-
This reply was modified 6 years, 11 months ago by
Brainvoyager.
Hello @brainvoyager,
Try :
wget -O /dev/null “https://www.yourwebsite.com/?es=cron&guid=evnloh-eqotdy-fmswkp-oqwlgp-gbuzak”Don’t forget to replace “https://www.yourwebsite.com/?es=cron&guid=evnloh-eqotdy-fmswkp-oqwlgp-gbuzak” with your own Cron URL of Email Subscribers.
If you select for exemple sent every day at 19.30pm you should have :
30 19 * * * wget -O /dev/null “https://www.yourwebsite.com/?es=cron&guid=evnloh-eqotdy-fmswkp-oqwlgp-gbuzak”(Maybe it is better if yourwebsite is in ssl https://…)
This code work for me on Cpanel.
Hi @complicword
Thank you very much for your message!!
I tried the script you gave in my cPanel but to no avail. cPanel tells me that the url is invalid. It does only accept my url without the prefix wget -O /dev/null.
My website is in https:// and I tried the url with your prefix with the “s” and without the “s”. Does not make any difference… ??
I’m sorry if it did not help.
As i said it worked for me.
Check if you really have file “wp-cron.php” in your root wordpress.
Check if you have good double quote in your cron code.
If you have https it’s better to use it in your adress call
And at last, the best is to see the cron instruction Cpanel from your server.
Maybe you must call wp-cron.php with a different way as
/usr/local/bin/php /home/yourname/etc… ?Hi @complicword,
Thanks much again for your efforts!!
I will try your tips and see if I can get cron to work.
Do let me know if it works for you.
@complicword
Thank you for helping @brainvoyager. I appreciate your contribution.No need to be sorry, your contributions are highly appreciated! ??
I checked if I have “wp-cron.php” in the root of my WordPress installation. And I do.
What do you mean by “Check if you have good double quote in your cron code”?
I indeed have https. But my hosting provider told me that “cron jobs cannot be triggered over https”. I tried the url with and without the s, but to no avail. I always get the same error message.
Unfortunately I do not understand your last tip: “Maybe you must call wp-cron.php with a different way as /usr/local/bin/php /home/yourname/etc…”
I’m still getting the same error message by email after the cron job was triggered: “cURL error: (47) Maximum (5) redirects followed”
I’m still totally lost as to this error message. I do not know what this means. My hosting provider told me again to get in touch with the plugin developer (Email Subscribers) and that they do not support issues like this.
Right now I feel as if I am trapped in a kind of loop. Maybe I must face the fact that cron jobs are not meant for me. Or maybe I have to search for another plugin that does work with cron jobs.
But maybe @prathameshp has some options left?
-
This reply was modified 6 years, 10 months ago by
Brainvoyager.
In my other thread (https://www.ads-software.com/support/topic/email-subscribers-didnt-send-email-to-all-subscribers/) I reported about the fact that when I use “Send email immediately”, the plugin does report under tab “Reports” that my Newsletter has been sent to all subscribers, but when I open the report I see that it sent my Newsletter to only two third of the number of subscribers I actually have.
I have 101 subscribers at the moment. So, the report header under “Reports” says 101, just like the confirmatiom email I receive, but in the report details I see that only 62 subscribers have been sent my Newsletter. That’s problem 1.
Due to the fact I cannot get cron job to work (problem 2), I decided to split my subscribers list in two. I created two groups (Public 1 with 51 subscribers and Public 2 with 50 subscribers) in order to get the plugin to work properly via the “Send email immediately” option. Now I have two groups which means that I have to send my Newsletter to every group separately. It’s a workaround I do not like, but if it works then it works.
I just sent my Newletter to the subscribers of group Public 1. I have not send the Newletter to the subscribers of group Public 2 yet.
And now I ran into problem 3: the damn plugin just sent my Newsletter twice to the 51 subscribers of Public 1!!! Under “Reports” I got two new entries stating that the email has beent sent to 51 subscribers!!! I’m damn sure I sent out my Newsletter only once. Since I’m one of the subscribers, I can acknowledge that I just received my Newsletter twice!!
I will wait for another 2 days in order to see if the plugin developer can help me out. If not, then I will delete plugin Email Subscribers from my website. Right now it’s the most buggy not-working plugin I have ever had. It harms my business as well as my reputation and makes me look like a fool. I do not want that and I cannot have that.
I highly regret this because I do like the lay-out of the output and the possibilities the plugin offers as to creating nice templates for my Newsletters. Also the post notifications are great. In the beginning I have seriously been thinking of upgrading to the paid version. That was when the plugin still worked fine. But throwing away my money is not something I like. Right now I cannot recommended this plugin to other people. It simply does not work properly anymore. And cron job has never worked for me.
-
This reply was modified 6 years, 10 months ago by
Brainvoyager.
-
This reply was modified 6 years, 10 months ago by
Brainvoyager.
What hosting provider are you with? I am with SiteGround.
Understanding your frustation (rock n hard place) and to add to the much appreciated support @complicword has given and suggested my crone set up in cPanel works ok I set it to run once every 2hrs to keep the processing and script executions down as my host has limitation on my package.
I will take a look at mine and paste it here if it is any different from what has been supplied by @complicword.
A note to consider is that (and apologies if you already know this), WP Cron & cPanel cron are different animals.
Some hosting providers have limitations how often They state you should trigger cPanel cron and like wise WP cron has problems with multiple close time triggering. cPanel cron jobs don’t like being triggered within 30mins of each other as it does not allow for previous scripts to complete successfully a future point to consider.
This fact be known I also tame my WP cron from multiple trigering but that’s another story.
Ill post back my cPanel cron string when I have checked it against what you have already received via @complicword.
Finally yes, as @complicword has stated “quotes”, depeding what you have set font wise for your platform, make sure they are not styled font quotes but standard vertical machine quotes as cron is sensitive to syntax.
i.e. as an enlarged over expanded example of what font styled quotes to avoid. These are \\xxxx\\ or //xxxxxx// and this is best practice quotes to utilise ||xxxx|| standard vertical quotes.
Just seeds for thought.. ??
Andrew
Thank you very much @andrewmperryman. I will check the quotes (cPanel did not accept the quotes in the command line initally, so maybe I have to use the vertical machine quotes instead).
In my cPanel there’s only one field in which I can put a command line…
My hosting provider is TransIP.
-
This reply was modified 6 years, 10 months ago by
Brainvoyager.
-
This reply was modified 6 years, 10 months ago by
Brainvoyager.
-
This reply was modified 6 years, 11 months ago by
- The topic ‘Error message when trying to send newsletter via cron job’ is closed to new replies.