Answers.Body: <p>Hope you adding <code>&gt;/dev/null 2&gt;&amp;1</code> and not only <code>/dev/null 2&gt;&amp;1</code> at the end of the cron string.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T18:44:04.463Z
Answers.Text: Resulting string:
  
      1 */2 * * * /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0 > /dev/null 2>&1
  
  correct. Whoops, I actually did use > in the original. Thanks! (Unfortunately, this was not the cause.)
Answers.UserDisplayName: Chris
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-15T18:42:56.877Z
Answers.LastActivityDate: 2020-01-15T18:42:56.877Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>WordPress Version: 5.3.2</p>
  
  <p>CiviCRM - Version 5.21.1</p>
  
  <p>Shared Hosting - Dreamhost</p>
  
  <p>I have tested this string in ssh:</p>
  
  <pre><code>/usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0
  </code></pre>
  
  <p>It yielded this result:</p>
  
  <pre><code>Array
  (
    [is_error] =&gt; 0
    [version] =&gt; 3
    [count] =&gt; 1
    [values] =&gt; 1
  )
  </code></pre>
  
  <p>I assume this is correct, because when it runs in ssh, the web interface tells me cron has run in the status page. So I went to the next step, adding it to cron.</p>
  
  <p>I tried using crontab -e, but it didn't seem to work there, so I tried it with the dreamhost cron interface:</p>
  
  <pre><code>1 */2 * * * /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0
  </code></pre>
  
  <p>This worked because I kept getting emails every two hours one minute after the hour with the array message above. So I appended <code>&gt; /dev/null 2&gt;&amp;1</code> to the string, hoping that I could run it without receiving any emails unless there's an error. </p>
  
  <p>Well I'm not receiving errors and the cron isn't running. I'm missing something. I'd be grateful for any suggestions to fix it. Thanks!</p>
  
Tags: <wordpress><cron><cron-job>
Title: Cron Job Diagnostics
ThreadText: # Cron Job Diagnostics
  
  (Asked by: username_0 on 2020-01-15)
  
  WordPress Version: 5.3.2
  CiviCRM - Version 5.21.1
  Shared Hosting - Dreamhost
  I have tested this string in ssh:
  /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0
  
  It yielded this result:
  Array
  (
    [is_error] => 0
    [version] => 3
    [count] => 1
    [values] => 1
  )
  
  I assume this is correct, because when it runs in ssh, the web interface tells me cron has run in the status page. So I went to the next step, adding it to cron.
  I tried using crontab -e, but it didn't seem to work there, so I tried it with the dreamhost cron interface:
  1 */2 * * * /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0
  
  This worked because I kept getting emails every two hours one minute after the hour with the array message above. So I appended > /dev/null 2>&1 to the string, hoping that I could run it without receiving any emails unless there's an error. 
  Well I'm not receiving errors and the cron isn't running. I'm missing something. I'd be grateful for any suggestions to fix it. Thanks!
  
  **Tags:** wordpress, cron, cron-job
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-15. Score: 2
  
  Hope you adding `>/dev/null 2>&1` and not only `/dev/null 2>&1` at the end of the cron string.
  
  > **Comments:**
  > **username_0**: Resulting string:      1 */2 * * * /usr/bin/wp --user=username --url=https://mysite.org --path=/home/username/mysite.org/ civicrm api job.execute auth=0 > /dev/null 2>&1  correct. Whoops, I actually did use > in the original. Thanks! (Unfortunately, this was not the cause.)  
  
  ---
  
  