Answers.Body: <p>Not sure why it's suddenly started producing output when it didn't previously, but you could use:</p>
  
  <pre><code>#!/bin/sh
  a=`drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute`
  if echo $a | grep -qv '\[is_error\] =&gt; 0'; then echo $a; fi
  </code></pre>
  
  <p>(capture the output of drush to variable <code>a</code> then check whether <code>is_error</code> is 0.  If it is, do nothing otherwise show the output)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-11T20:20:54.457Z
Answers.LastActivityDate: 2019-04-11T20:20:54.457Z
Answers.UserDisplayName: Aidan
Body: <p>I have a cron job</p>
  
  <p>/www/www/job.execute.sh</p>
  
  <p>That runs the civiCRM scheduled tasks:</p>
  
  <pre><code>#!/bin/sh
  drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute
  </code></pre>
  
  <p>This has been running successfully without any output for months. Now it has started producing this output:</p>
  
  <pre><code>Array
  (
  [is_error] =&gt; 0
  [version] =&gt; 3
  [count] =&gt; 1
  [values] =&gt; 1
  )
  </code></pre>
  
  <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-11T22:48:33.873Z
Comments.Text: 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. https://civicrm.stackexchange.com/questions/29176/blank-emails-from-cron-after-upgrade-wordpress. But I'm running in a different environment
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-12T11:05:39.657Z
Comments.Text: This happened after an upgrade to version 5.11.0
Comments.UserDisplayName: Jack Donohue
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-12T12:21:26.953Z
Comments.Text: Same upgrade as caused my unwanted emails.
Comments.UserDisplayName: Mick Kahn
Tags: <cron><drush>
Title: Cron job has started producing output
ThreadText: # Cron job has started producing output
  
  (Asked by: username_0 on 2019-04-11)
  
  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?
  
  **Tags:** cron, drush
  
  > **Comments:**
  > **username_1**: 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. https://civicrm.stackexchange.com/questions/29176/blank-emails-from-cron-after-upgrade-wordpress. But I'm running in a different environment  
  > **username_0**: This happened after an upgrade to version 5.11.0  
  > **username_1**: Same upgrade as caused my unwanted emails.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-04-11. Score: 4
  
  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)
  
  
  ---
  
  