0

WP4.9.6 / CiviCRM 5.1.2

Having some issues with cron jobs using cv. I have a cron running with cli.php but that requires a password. I'm about to implement 2FA which breaks that approach.

I've got cv installed (well technically my hosting provider installed it for me), and I can call it from ssh, but it doesn't seem to trigger the scheduled jobs (even when I replace admin with a valid WP / CiviCRM superuser account name)?

bash-3.2$ cv api job.execute --user=admin --cwd=/var/sites/h/hbb.org.uk/public_html -vvv
[BootTrait] Start
[BootTrait] Attempting to set verbose error reporting 
[BootTrait] Call standard cv bootstrap
[Bootstrap] Options: {
  "dynamicSettingsFile": "phar:///var/sites/h/hbb.org.uk/cv.phar/settings_location.php",
  "env": "CIVICRM_SETTINGS",
  "prefetch": true,
  "settingsFile": null,
  "search": true,
  "cmsType": null,
  "httpHost": "",
  "output": {} }

[Bootstrap] Find settings file
[Bootstrap] Load supplemental configuration for "/var/sites/h/hbb.org.uk/public_html/wp-content/uploads/civicrm/civicrm.settings.php"
[Bootstrap] Load settings file "/var/sites/h/hbb.org.uk/public_html/wp-content/uploads/civicrm/civicrm.settings.php"
[Bootstrap] Find CMS root for "/var/sites/h/hbb.org.uk/public_html"
[Bootstrap] Found "wp" in "/var/sites/h/hbb.org.uk/public_html"
[Bootstrap] Simulate web environment in CLI
[Bootstrap] Initialize class loader

[Bootstrap] Call core bootstrap 
[Bootstrap] Finished

[BootTrait] Call core bootstrap
[BootTrait] Call CMS bootstrap

My site is an upgrade from before 4.6 so my civicrm.settings.php is in ../plugins/civicrm which I've copied to ../uploads/civicrm just in case, but to no effect.

Everything seems to work, but nothing happens?

2
  • I do think you don't need the username in cv command for the cron. What would happen if you call cv from the civicrm directory? Commented Jun 6, 2018 at 8:47
  • The documentation includes user=admin so I figure it's needed? Commented Jun 8, 2018 at 9:31

1 Answer 1

0

Closing this as I've managed to get wp-cli to work from ssh, just trying to get it to work from cron now....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.