Answers.Body: <p>I manage one WordPress multisite instance, so I looked how cron is configured.</p>
  
  <p>We use <a href="http://wp-cli.org" rel="nofollow noreferrer">wp-cli</a> with the CiviCRM extension to trigger cron.</p>
  
  <p>Cron jobs look like:</p>
  
  <pre><code>11,26,41,56 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber7.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/New_York job.execute auth=0 &gt; /dev/null
  12,27,42,57 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber8.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/Los_Angeles job.execute auth=0 &gt; /dev/null
  </code></pre>
  
  <p>Note that if your multisite instances are in a subdirectory, rather than a different domain, you can set the URL accordingly and it still works.</p>
  
  <p>Also note: Some WordPress plugins can interfere with cron!  That's not multi-site specific, but you can exclude plugins from loading with wp-cli either by specifying on the command line or creating a config file.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-29T04:14:51.160Z
Answers.LastActivityDate: 2017-09-29T04:14:51.160Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I have a multisite WordPress setup with CiviCRM 4.7.23 and I am unable to create a successful cron job. I tried CLI with all parameters (including -s) and with no parameters but each time I get no output and CiviCRM says cron was not executed.</p>
  
  <p>I tried the URL method</p>
  
  <p><a href="https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXX" rel="nofollow noreferrer">https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXX</a></p>
  
  <p>and same thing.</p>
  
  <p>I tried, just for fun, the cli file via a browser and I got</p>
  
  <blockquote>
    <p>cli.php can only be run from command line.</p>
  </blockquote>
  
  <p>which is at least correct. :)</p>
  
  <p>The site in question is hosted on CiviHosting and the setup there is known to support both CLI and URL cron jobs for single-site setups.</p>
  
Tags: <wordpress><cron><multisite>
Title: Cron job for Multisite in WordPress
ThreadText: # Cron job for Multisite in WordPress
  
  (Asked by: username_0 on 2017-09-28)
  
  I have a multisite WordPress setup with CiviCRM 4.7.23 and I am unable to create a successful cron job. I tried CLI with all parameters (including -s) and with no parameters but each time I get no output and CiviCRM says cron was not executed.
  
  I tried the URL method
  
  <https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXX>
  
  and same thing.
  
  I tried, just for fun, the cli file via a browser and I got
  
  > cli.php can only be run from command line.
  
  which is at least correct. :)
  
  The site in question is hosted on CiviHosting and the setup there is known to support both CLI and URL cron jobs for single-site setups.
  
  **Tags:** wordpress, cron, multisite
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-29. Score: 2 | Accepted answer
  
  I manage one WordPress multisite instance, so I looked how cron is configured.
  
  We use [wp-cli](http://wp-cli.org) with the CiviCRM extension to trigger cron.
  
  Cron jobs look like:
  
  ```
  11,26,41,56 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber7.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/New_York job.execute auth=0 > /dev/null
  12,27,42,57 * * * * /full/path/to/wp-cli --user=civicrmcron --url=https://sitenumber8.org/ --require=/full/path/to/wp-cli/civicrm.php --path=/path/to/wordpress/webroot civicrm api --timezone=America/Los_Angeles job.execute auth=0 > /dev/null
  
  ```
  
  Note that if your multisite instances are in a subdirectory, rather than a different domain, you can set the URL accordingly and it still works.
  
  Also note: Some WordPress plugins can interfere with cron! That's not multi-site specific, but you can exclude plugins from loading with wp-cli either by specifying on the command line or creating a config file.
  
  
  ---
  
  