Answers.Body: <p>Closing this as I've managed to get wp-cli to work from ssh, just trying to get it to work from cron now....</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-08T09:33:23.070Z
Answers.LastActivityDate: 2018-06-08T09:33:23.070Z
Answers.UserDisplayName: John Bradford
Body: <p>WP4.9.6 / CiviCRM 5.1.2</p>
  
  <p>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.</p>
  
  <p>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)?</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>Everything seems to work, but nothing happens?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-06T08:47:42.823Z
Comments.Text: 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?
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-08T09:31:46.453Z
Comments.Text: The documentation includes user=admin so I figure it's needed?
Comments.UserDisplayName: John Bradford
Tags: <cron><cv><wp>
Title: cron calling cv but not executing?
ThreadText: # cron calling cv but not executing?
  
  (Asked by: username_0 on 2018-06-04)
  
  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?
  
  **Tags:** cron, cv, wp
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_0**: The documentation includes user=admin so I figure it's needed?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-06-08. Score: 0 | Accepted answer
  
  Closing this as I've managed to get wp-cli to work from ssh, just trying to get it to work from cron now....
  
  
  ---
  
  