CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Cron job not sending any mail
Pages: [1] 2

Author Topic: Cron job not sending any mail  (Read 6543 times)

jaymcgraw

  • I post occasionally
  • **
  • Posts: 106
  • Karma: 6
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7.12
  • MySQL version: 5.0.92-community
  • PHP version: 5.2.11
Cron job not sending any mail
March 21, 2011, 12:35:11 pm
After setting up a mass mailing and scheduling it to send immediately, the cron job puts the mailing into "Running" mode, but does not actually send any messages (or queue any messages).

I've tried running the civimail.cron.php both from the shell and through a browser and it returns no information whatsoever.

I've verified I can send an individual email through Civi.

And the mailing will queue and send if I trigger the sending process by browsing to civicrm/mailing/queue&reset=1.

Any thoughts on where to look for further troubleshooting or what could be going wrong here?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
March 21, 2011, 01:23:46 pm
Make sure the "civimail cron user" has access to 'view all contacts'
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Bairnsfather

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Drupal 7
  • MySQL version: 5.0.x
  • PHP version: 5.2.x
Re: Cron job not sending any mail
June 01, 2012, 11:49:42 am
I had this same issue. Thanks to Hershel I was able to solve it.

Here’s an additional tip. The Drupal user I created solely to run cron, and gave it the permissions to do so, I also chose to “block” it on the Drupal side. So even if somehow someone sees the curl URL that cron calls from my host’s cron server to my web server, they will not be able to log in.

So far I’ve not found any flaws with this. Thoughts welcomed.

(However, I read that with 4.2 they are removing the need to send a user ID and password in the URL.)

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 21, 2012, 10:55:33 am
Hi I'm running 4.2.6 I can not get any scheduled mailings to send I am running cron thru the CP for Bluehost this is what I am running with there cron jobs
 /ramdisk/bin/php5 -c /home3/sironeze/public_html/php.ini/home3/sironeze/public_html/sites/all/modules/civicrm/bin/cron.php  it seems to run I get an email reply with only this
 X-Powered-By: PHP/5.2.17
Content-type: text/html

However the emails are never sent I am new to setting up cron jobs any pointers would be greatly appreciated.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
December 22, 2012, 11:07:56 am
You need to pass the username, login and site key to the cron job. Here are the docs for setting up the cron job: http://wiki.civicrm.org/confluence/display/CRMDOC42/Managing+Scheduled+Jobs
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 22, 2012, 05:51:29 pm
Hershel,
Thanks I am now using  wget -O - -q -t 1 "https://www.sir102.org/public_html/sites/all/modules/civicrm/bin/cron.php?user=myusername&pass=mypassword&key=mysite-key"

however I now get a 404 error as follows:
--2012-12-22 09:00:01--  https://www.sir102.org/public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=%3CMy%20name%3E&pass=%3Cmypassword%3E&key=%mysitekey%3E
Resolving www.sir102.org... 173.254.15.168
Connecting to www.sir102.org|173.254.15.168|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-12-22 09:00:01 ERROR 404: Not Found.

Not sure why the path to the file is correct and the file is there. One question do I use the CiviCRM site key or the Dupal Cron Key?

Thanks for your help
« Last Edit: December 22, 2012, 06:08:28 pm by kc6ape »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
December 22, 2012, 07:21:52 pm
Remove /public_html from your URL. Use the CiviCRM site key.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 23, 2012, 08:42:08 am
Quote from: Hershel on December 22, 2012, 07:21:52 pm
Remove /public_html from your URL. Use the CiviCRM site key.

Hershel,
Removed public_html from the path and now get a 500 Internal Server Error so I need public_html in the path. I have been using the CiviCRM site key, just wasn't sure if that was correct.

Thanks again for your assistance

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
December 23, 2012, 08:51:10 am
That URL with public_html gets a 404 because it's the wrong URL. 404 means the URL was not found: http://en.wikipedia.org/wiki/HTTP_404

Without the public_html it's the correct URL, but it's generating a server side error. Look in your error logs or ask your host what that error is.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 23, 2012, 09:30:14 am
Thanks Hershel,
Been working with Bluehost tech support, I use "support" literally! They told me to hire a professional to fix the problem. I will check the logs and keep hammering away at it.

Thank you again for your superb help.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cron job not sending any mail
December 23, 2012, 09:48:26 am

in general, we dont recommend shared hosting providers like bluehost due to their various limitations.

as u get into using civimail for large number of emails, the limitations become a big issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 23, 2012, 09:56:35 am
Thanks I'm finding that out I did get them to increase my hourly mail limit . It just occurred to me that I am using wget in my cron job but I never installed it! where do I need to install wget? I assumed it was on my server but can't find it anywhere. I have downloaded the current version not sure where it needs to be installed.

Thanks for the help

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
December 23, 2012, 09:58:41 am
wget is a Linux executable. On shared hosting, you don't install it--your host does. Virtually any Linux host will already have this installed, and your host does have it installed already, and it appears to work.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kc6ape

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.63-community-log
  • PHP version: 5.3.15
Re: Cron job not sending any mail
December 24, 2012, 08:30:30 am
I have the cron job running now with no errors However past scheduled emails are not being sent. I am using the host CP to run cron jobs
I ran this with no errors but no mail sent

wget -O - -q -t 1 \ 'https://www.sir102.org/public_html/sites/all/modules/civicrm/bin/cron.php?name=<My ame>&pass=<My Password>&key=<My Site Key>&job=process_mailing'

So I tried this one it seems to work with no errors returned again no mail sent
wget -O - -q -t 1 \ 'https://www.sir102.org/public_html/sites/all/modules/civicrm/bin/cron.php&name=<My ame>&pass=<mypassword>&key=<mysitekey>'

Should I try running one of these from CiviCrm scheduled jobs page?

I'm at a total loss.

Thanks

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Cron job not sending any mail
December 24, 2012, 08:34:57 am
The outgoing email job is enabled?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Cron job not sending any mail

This forum was archived on 2017-11-26.