0

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!

2

Hope you adding >/dev/null 2>&1 and not only /dev/null 2>&1 at the end of the cron string.

  • Resulting string: 1 */2 * * * /usr/bin/wp --user=username --url=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.) – Chris Jan 15 at 18:44

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.