3

Relevant set-up information:

  • Hosting: Bluehost Shared Hosting
  • CMS: WordPress
  • CiviCRM version: 5.25.0

Here's what works:

  1. Sending email from via "Contacts > New Mail"
  2. Sending a test mail from "Settings - Outbound Mail"
  3. Sending a test mail from a mailing in CiviMail under "Define Mailing" from the Preview pane

Here's what doesn't work:

  1. Sending a scheduled mail via CiviMail's "Review and Schedule", neither in "Send Immediately" nor "Send at:";
  2. Going to Schedule Jobs and hitting Execute Now for Sending Mail;

Now I'm told by the system that Cron jobs are not set up, though I have put one in CPANEL.

Here is my CRON command that is running every 5 minutes:

wget -O - -q -t 1 'https://<domain>/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=<username>&pass=<password>&key=<sitekey>&job=execute'

The "username" is an Administrator.

Tech support says my Cron jobs are running. "Scheduled Jobs Log> Send Scheduled Mailings" states that jobs are getting kicked off

Entity: job Action: process_mailing
Summary
Finished execution of "Send Scheduled Mailings" with result: Success (a:1:{s:9:"processed";i:0;})
Details

Parameters parsed (and passed to API method): 
a:1:{s:7:"version";i:3;}

Full message: 
Finished execution of Send Scheduled Mailings with result: Success (a:1:{s:9:"processed";i:0;})

Despite all this, no mails are showing up in the test groups inboxes.

Is it my Cron job settings? If so, has anyone been able to set up cron jobs effectively in CPANEL for CiviCRM?

  • See comments on civicrm.stackexchange.com/questions/35979/… – Aidan Jun 26 at 10:27
  • Have you tested that this might simply be a permission issue? I also use the wget cron method using cron.php. Every time there is a civicrm update, I have to change the permission level in /wp-content/plugins/civicrm/civicrm/bin/cron.php to 744 in order that execution actually takes place. Just a thought. – peterb Jun 28 at 10:07
  • Permission was at 644, so I changed it to 744. However that was not the solution. – Dwight Martino Jun 29 at 16:38
2

Success, with minor change in syntax I am now able to send schedule mail using Cron jobs to kick off schedule mails. Here is my method for running CiviCRM cron jobs on Bluehost shared hosting every 16 minutes. Previously I had also specified the the parameter job.execute, which I have removed.

wget -O - -q -t 1 'https://<my-domain>/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=<username>&pass=<password>&key=<sitekey>'

I have scheduled 5 different mailing jobs at 15-60 minute intervals and each has delivered within 3 minutes of scheduled sending. Moreover, my Cron status is "Cron Running OK".

Bluehost does limit the frequency of cron jobs on shared hosting to between 16 and 25 minutes, so cron is kicking off as frequently as possible.

| improve this answer | |
1

Welcome to SE! If it were working when you use 'Execute now' but not from cron, then I'd look at the cron settings. But in your case 'Execute now' is not producing mails and that does not involve cron.

=== edited ===

  • Are you using Mosaico and Flexmailer - if so, which versions?
  • What are your settings for outbound mail?
  • At the place where you add recipient groups, how many recipients does it count?
| improve this answer | |
  • I agree with the first part from Aidan, in that cron is not the problem, but I don't think the question is anything to do with Scheduled Reminders. I just read the question as being about Scheduled Mailings. The log matches what I get for successful operation of the Scheduled Mailing job. – Mick Kahn Jun 26 at 10:05
  • Oops - thanks @MickKahn! I'm sure I read 'scheduled reminder' somewhere - must have been pre-coffee! Edited now – Aidan Jun 26 at 10:24
  • 1
    I am using FlexMailer 1.1.1, and Mosaico 2.4.1592820024. Settings - Outbound Mail: [ mail() ] Recipients: Somehow the test group was empty. That would explain a lot. Now that I have refilled the test group, mailing does function when I go to Schedule Jobs and hit Execute Now for process_mail. Considering that I'm still getting a "Cron Not Running - No cron runs have been recorded" message, I believe that cron is not kicking off. Was there something wrong with my syntax? – Dwight Martino Jun 26 at 14:42
  • 1
    @DwightMartino you might want to jump in at chat.civicrm.org about this as well - I and a fellow admin got some great help from Michael O'Toole recently with setting up cron on Bluehost. A challenge we had is the "jailed shell" that Bluehost allows with cPanel. See my.bluehost.com/hosting/help/180 and docs.cpanel.net/knowledge-base/accounts/virtfs-jailed-shell . – Joe McLaughlin Jun 27 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.