0

I have a cron job

/www/www/job.execute.sh

That runs the civiCRM scheduled tasks:

#!/bin/sh
drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute

This has been running successfully without any output for months. Now it has started producing this output:

Array
(
[is_error] => 0
[version] => 3
[count] => 1
[values] => 1
)

which has the effect of sending me an email with this content every hour. AFAIK, I did nothing to cause this, but it is very annoying. Do you know why this has started happening?

  • Would be useful to know what version you are running. Have you upgraded recently. I've also seen an unhelpful change in behaviour after an upgrade. civicrm.stackexchange.com/questions/29176/…. But I'm running in a different environment – Mick Kahn Apr 11 at 22:48
  • This happened after an upgrade to version 5.11.0 – Jack Donohue Apr 12 at 11:05
  • Same upgrade as caused my unwanted emails. – Mick Kahn Apr 12 at 12:21
2

Not sure why it's suddenly started producing output when it didn't previously, but you could use:

#!/bin/sh
a=`drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute`
if echo $a | grep -qv '\[is_error\] => 0'; then echo $a; fi

(capture the output of drush to variable a then check whether is_error is 0. If it is, do nothing otherwise show the output)

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.