1

Running on Wordpress 4.8.7. No problem with Cron on 5.3.1, but right after upgrading we're getting warning that cron is not running.
"Cron Not Running- Last cron run at July 28th, 2018 3:20 PM."

Here is crontab entry, sanitized:

*/10 * * * * /usr/local/bin/php /home2/xxxxxx/newarksymphony.org/wp-content/plugins/civicrm/civicrm/bin/cli.php -s www.newarksymphony.org -u xxxxxx -p xxxxxxxxx -e Job -a execute

Scheduled jobs log shows that jobs are indeed running every 10 minutes.  

==================================

2018-07-29 15:40:02 Civirules cron
Entity: Civirules Action: Cron

Summary Starting execution of Civirules cron Details Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;} Full message:

Starting execution of Civirules cron

==================================

2018-07-29 15:30:02 Civirules cron
Entity: Civirules Action: Cron

Summary Finished execution of Civirules cron with result: Success (a:0:{}) Details Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;} Full message:

Finished execution of Civirules cron with result: Success (a:0:{})

=================================

3

Can you please check MYSQL and PHP are using the same timezone? This sometimes happens when both are running on different timezones.

You can find a solution for similar sorts of issues here.

  • I checked and PHP was on US Eastern and MYSQL "system_time_zone" was Central, one hour off. I'm on shared hosting and don't have control over the latter. But I'm trying a solution (in civicrm.settings.php) based on stackoverflow.com/questions/34428563/… There are a few time_zone variables in SQL. How can I be sure what is really in use? – PhilF Jul 31 '18 at 0:28
  • Found a way to easily look at the PHP vs SQL times. In the table log_civicrm_job the column "last_run" show the job run time, based on PHP, and "log_date" shows the log entry time based on SQL server. In my case the times are still off by 1 hour even though I have this in civicrm.settings.php: $db = new PDO('mysql:host=localhost;dbname=realdbname', 'dbuser','password'); $db->exec("SET time_zone='-4:00';"); But the cron running error has gone away even with the timezones off by an hour. – PhilF Aug 1 '18 at 19:39

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.