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) »
  • Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
Pages: [1]

Author Topic: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting  (Read 4716 times)

dwfriederichs

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 1
Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 02, 2011, 12:21:32 pm
I've been trying for a while (off and on) to get CiviMail set up with CiviCRM 3.1.5 for Joomla.  I'm having a terrible time getting it done and am hoping someone can help.  I don't have a lot of Linux experience and I know that's holding me up.

I'm hosted on IXWebHosting and have created the cron job to run every 5 minutes.  It uses a web interface, not command line, to create the job.   A screenshot of the job setup is at http://careerep.net/images/cron_jobs.png.

I'm using the following command which I got from http://wiki.civicrm.org/confluence/display/CRMDOC31/CiviMail+Installation.

<host username> wget -O - -q -t 1 --post-data='name=<site username>&pass=<site user password>&key=<site key>' http://careerep.net/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php

The job does run every 5 minutes, but I get this error on the notifications:

/bin/sh: <host username>: command not found

When I remove the host username from the command, it doesn't execute at all. 

I'm about to pull my hair out.  Can anyone share any insight?

krankie

  • I’m new here
  • *
  • Posts: 22
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Joomla! 1.5.22
  • MySQL version: 5.0.22-log
  • PHP version: 5.2.11
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 05, 2011, 05:27:05 pm
Try doing it this way.  I know it says its for Drupal installations but I've found it works with Joomla just by using the Joomla version of the url path.  See the first wget example about one third down the page.

http://wiki.civicrm.org/confluence/display/CRMDOC33/Running+Command-line+Scripts.

So two seperate files to create (same directory) and then get your cron to execute the second one containing the wget command.

Remember to substitute the Drupal URL with the The Joomla URL in your wget command above.
« Last Edit: January 05, 2011, 05:41:50 pm by krankie »

dwfriederichs

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 1
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 09, 2011, 06:56:02 am
Krankie, thanks for the insight.  I tried using the wget command outlined in the 3rd example and it looks like the cron job is running successfully, but my pending mail isn't being sent.  Here's the email report I get from the cron daemon, with <user>, <pass>, and <key> substituted for the real data.  Any ideas on why CiviMail might not be sending?

Thanks!



--2011-01-09 09:40:01--  http://careerep.net/administrator/components/com_civicrm/civicrm/bin/civimail.cronjob.php?name=<name>&pass=<pass>&key=<key>
Resolving careerep.net... 96.0.106.2
Connecting to careerep.net|96.0.106.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `civimail.cronjob.php?name=<name>&pass=<pass>&key=<key>'

     0K                                                        0.00 =0s

2011-01-09 09:40:02 (0.00 B/s) - `civimail.cronjob.php?name=<user>&pass=<pass>&key=<key>' saved


krankie

  • I’m new here
  • *
  • Posts: 22
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Joomla! 1.5.22
  • MySQL version: 5.0.22-log
  • PHP version: 5.2.11
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 11, 2011, 03:01:01 pm
Hmm, need a bit more detail to focus in on the error.  It could be your CiviMail configuration but it could also be a server email problem.

Is the cron advancing a CiviMail status from 'Scheduled' to 'Running' or 'Complete'?

Have you checked your settings in Administer > Configure > Global Settings > Outbound Email ?
There is a 'Save and Send Test Email' option on there which will send an email to allow you to check that Civi is configured correctly to user your server's mail service.

You should have an admin control panel for your server. (CPanel or Plesk).  Check that the mail daemons are running.

Finally if Civi Test email works and mail daemon on server is OK then the focus is back on the Civimail cron job configuration.
If you append the cron command with ><pathname>/civimail_stdout 2><pathname>/civimail_stderr  you will get normal and error output directed to those files which may contain more useful information to identify the problem.

Keep at it, CiviMail is well worth it.




krankie

  • I’m new here
  • *
  • Posts: 22
  • Karma: 2
  • CiviCRM version: 3.3.5
  • CMS version: Joomla! 1.5.22
  • MySQL version: 5.0.22-log
  • PHP version: 5.2.11
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 11, 2011, 03:36:17 pm
Just as an update I've spotted something interesting on the IXWebhosting website.

If you are on one of their standard hosting plans (Expert Plan, Unlimited Pro or Business Plus) rather than a VPS or Cloud plan then their email services run on seperate servers to their webhosting servers, so the default Civi email settings will not work.  They also seem to have an interesting 'POP before SMTP' anti-spam system in place whereby you need to log in to retrieve emails through POP before you can send using SMTP.

This shouldn't be an issue with VPS or cloud plans.  Which hosting plan are you on?

dwfriederichs

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 1
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 12, 2011, 03:48:54 pm
CiviMail's not advancing the mailing status - everything sits at "scheduled".  The test email works, and sending email to individual contacts and contacts in search results works, but CiviMail mailings don't. 

I'm on their Expert plan, but haven't had any trouble sending email, just trouble sending through CiviMail.

I keep thinking it has to be the cron command.  I'll add the parameters you mentioned and see if that gives me any more useful info.

If you think of anything before my next reply, please share.  Thanks!

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting
January 12, 2011, 10:39:35 pm
Perhaps you are getting bit by hosting provider "CPU Utilization Police" running shell scripts via cron.

I would suggest putting a shell script wrapper around running the civimail cron task, and capture all of the output with tee. Following is the shell script I use for UpdateMembershipRecord.php:

Code: [Select]
#!/bin/bash

umask 002
DATETIME=`/bin/date +%Y%m%d-%H%M%S`
PARAMS='-sdefault -ucivicrm-cron -p*************'

cd /srv/www/sites/domain.org/www/sites/all/modules/civicrm
/usr/bin/nice -n19 /usr/bin/php bin/UpdateMembershipRecord.php $PARAMS 2>&1 | /usr/bin/tee -a /srv/www/reports/$DATETIME.domain.civicrm-civimember.UpdateMembershipRecord.php.sh.log

Then see what you end up with as in the log file. Perhaps you see it start and then suddenly end.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Can't Figure Out How to Configure CiviMail Cron Jobs on IXWebHosting

This forum was archived on 2017-11-26.