I'm trying to kill off an error in WP "Cron Not Running"

I installed cv. Im putting lines into crontab that trigger cv, such as

*/5 * * * * cv api --user=www-data job.execute

...as per instructions related to this error.

The Civi error is persisting. Also, cv, unexpectedly to me, returns HTML as output at the command line, e.g.

foo@bar  sudo cv ext:list

Outputs HTML, counterintuitively.

This HTML appears to be the Wordpress site's top page itself (aka a maintenance mode page.

I thought cv with that option would list a bunch of vars, not spit up the site.

Anybody know what's up here?

  • Do you have a WordPress user named www-data or is that the name of the system user your webserver/cron run as? If there's no WP user by that name, that could trigger an error when using the --user param. Nov 27, 2017 at 23:26
  • You might be able to scroll through the HTML output looking for an error, or check CiviCRM's debug log for the cause of the problem. See also issues.civicrm.org/jira/browse/CRM-20820 Nov 27, 2017 at 23:26
  • I think I need help understanding why I'm even bothering with cv, or why "cron isn't running" when it's absolutely running. (Crontab entries run fine, tested that using touch /some/file way back at the beginning of this. Thanks for the note about the user name - I gave it a system user name (www-data) to match Apache's user and I guess I should give it the WP user name. Will do.
    – harrumph
    Nov 28, 2017 at 0:32
  • UNIX cron calls CiviCRM's Scheduled Jobs via cv. The error message you're seeing is a bit misleading in that regard; ideally it would say Scheduled Jobs not running rather than introducing a new term "cron" which has other meanings in the same domain. Scheduled Jobs are discussed in depth at that linked docs page (which I guess you've seen, since you got here already!). Nov 28, 2017 at 1:05
  • Thanks Chris. Am I seeing expected results with cv? Meaning, if i run sudo cv ext:list I'm supposed to see the site's top page HTML and nothing else?
    – harrumph
    Nov 28, 2017 at 16:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.