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) »
  • Setting up CiviMail Cron
Pages: [1]

Author Topic: Setting up CiviMail Cron  (Read 2058 times)

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Setting up CiviMail Cron
March 07, 2011, 08:01:53 pm
Ok, so I am really confused by all the instructions regarding the setup of the cron for civimail. It seems there are several different guides on setting them up, and they all seem to be different and not complete (at least for someone with my limited knowledge).

Can anyone really break it down for me? I am using a GoDaddy VPS, with Simple Control Panel installed. I can setup cron tasks from the control panel where it simply asks me for the command to run.

I have set up a drupal user called mailprocess.

I also have SSH access to the account, but have no idea where I am supposed to put files like civicrm-wgetrc, or where to go from there.

Thanks in advance. I really appreciate any help as CiviCRM looks to be awesome so far - just need to get over this one last hurdle

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Setting up CiviMail Cron
March 07, 2011, 09:40:56 pm
that's why we wrote this chapter:

http://en.flossmanuals.net/CiviCRM/SystemConfiguration

let us know if it helped. good luck
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up CiviMail Cron
March 08, 2011, 03:24:21 am
If you don't have experience with the Linux command line, I don't think the ssh method will be ideal. Using your control panel cron method, you could try to use the very last commands on the page Xavier reference. I refer to the part with the orange background under the header From the web server at the very bottom of the page.

You should be able to enter those as your command to run in the control panel.
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.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Setting up CiviMail Cron
March 08, 2011, 05:46:50 am
Tried the second method, and I just can't get it to work. Not sure why.

So I'm looking at the shell method, and it is just too light on specifics for me.

On this page posted previously, where does the file I have created (see second yellow box from the bottom) go? The one that starts with #This must be set to the directory where Civicrm is installed

and once I have placed it somewhere, how do I set up the cron to use it?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Setting up CiviMail Cron
March 08, 2011, 05:49:14 am
Hi,

search for crontab (that's the tool to set up the cron).
crontab -e

But before putting it in a cron, try the commands by hand on the cli, see if it works.
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up CiviMail Cron
March 08, 2011, 07:21:12 am
To clarify, the text in that box goes INTO your crontab--not in a file. Some distros offer different methods of doing this, but the universal method is to use the command

Code: [Select]
crontab -e
then you are in an editor and you just put that text there.
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.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Setting up CiviMail Cron
March 08, 2011, 01:38:27 pm
Thanks hershel. I am getting somewhere now with that bit of information. It's all a little new to me - sorry to be such a pain. It's probably easy (although once I have this figured out, I'd like to help rewrite the instructions on this section).

I am getting an error now though that says:
Code: [Select]
PHP Notice:  Use of undefined constant CIVICRM_CONFDIR - assumed 'CIVICRM_CONFDIR' in /home/fredlincca/public_html/drupal/sites/all/modules/civicrm/bin/cli.php on line 112
The reference to /home/fredlincca/public_html/drupal/sites/all/modules/civicrm/ is the full path of my civicrm installation. I get the same error on line 113.

Initially I thought it could be a problem with my usernames, as I wasn't sure I was using the right ones (drupal user name mail process, versus the username for my VPS (and then between my root username, and my domain username). I looked in cli.php, and now I think it might be something to do the CIVI_ROOT that I specified in crontab.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up CiviMail Cron
March 08, 2011, 02:02:37 pm
So what is your CIVI_ROOT defined as?
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.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Setting up CiviMail Cron
March 08, 2011, 02:08:02 pm
/home/fredlincca/public_html/drupal/sites/all/modules/civicrm

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Setting up CiviMail Cron
March 08, 2011, 02:17:19 pm
I do not know, but see this thread http://forum.civicrm.org/index.php?topic=17137.0
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.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: Setting up CiviMail Cron
March 09, 2011, 04:25:24 am
Alright, I eventually got this solved, but I had to use the following command in my webserver:

Code: [Select]
wget --post-data='name=username&pass=password&key=yoursiteinstallkey' "http://www.example.org/sites/all/modules/civicrm/bin/EmailProcessor.php"
The things I needed to remove to make it work:
-O - -q -t 1

And I needed to put the URL in quotation marks.

This works on the GoDaddy Virtual Dedicated Servers using Simple Control Panel

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Setting up CiviMail Cron

This forum was archived on 2017-11-26.