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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron Job: file saved but mail not sent
Pages: [1]

Author Topic: Cron Job: file saved but mail not sent  (Read 2030 times)

nikkislaw

  • Guest
Cron Job: file saved but mail not sent
April 22, 2009, 10:44:24 am
I'm having some trouble getting a cron job to run for CiviMail.  We're using Drupal 6.6 and CiviCRM 2.1.1.  I've checked and double checked the key to make sure it doesn't contain any forbidden characters.  The key has been inserted into civicrm.settings.php as

Code: [Select]
define( 'CIVICRM_SITE_KEY', 'key' );
I contacted the host and when we try to run:

Code: [Select]
wget 'http://sitename/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=name&pass=pass&key=key'
we get:

Code: [Select]
wget 'http://sitename/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=name&pass=pass&key=key'
--11:55:52--  http://sitename/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=name&pass=pass&key=key
           => `civimail.cronjob.php?name=name&pass=pass&key=key.2'

Resolving sitename... ip address
Connecting to sitename|ip address|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
 
    [ <=>                                                    ] 0             --.--K/s           
 
11:55:52 (0.00 B/s) - `civimail.cronjob.php?name=name&pass=pass&key=key.2' saved [0]

The host said a file was saved, but when I checked the CiviMail report it showed that the mail had NOT been sent.

When http://sitename/sites/all/modules/civicrm/bin/civimail.cronjob.php?name=name&pass=pass&key=key is run in a browser we get a blank white screen which I think I read was normal.

After reading this post we tried:

Code: [Select]
php "/hsphere/local/home/dir/sitename/sites/all/modules/civicrm/bin/civimail.cronjob.php" name=name pass=pass key=key
If we go to http://sitename/civicrm/mailing/queue?reset=1 in a browser the pending mail is sent, but we need an automated way to achieve this.

Any help or suggestions on where to go from here would be greatly appreciated.  Thanks in advance!

FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Cron Job: file saved but mail not sent
April 22, 2009, 11:05:34 am
I had more luck with curl than wget
Code: [Select]
/usr/bin/curl -s -o /dev/null 'http://localhost:80/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=(and so on)'
- s suppresses progress reports
-o /dev/null sends the output at the conclusion to e-oblivion


Lead Developer, C3 Design.
Twitter: @FatherShawn

nikkislaw

  • Guest
Re: Cron Job: file saved but mail not sent
April 22, 2009, 11:59:10 am
Thank you for the suggestion.  I passed it on to the host, but he said they don't have curl on their system.   :(

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron Job: file saved but mail not sent

This forum was archived on 2017-11-26.