Answers.Body: <p>Without quotes around the URL, your shell may interpret the '&amp;' character as a request to run a command in the background:</p>
  
  <pre><code>$ wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXXXX
  [1] 9887
  [2] 9888
  $ jobs
  [1]-  Exit 4                  wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX
  [2]+  Done                    pass=XXX
  $
  </code></pre>
  
  <p>Here it uses the URL up to but not including the first '&amp;', thus missing the <code>pass</code> and <code>key</code> parameters. Enclosing the URL in quotes should resolve this:</p>
  
  <pre><code>$ wget -O - -q -t 1 'none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXXXX'
  $
  </code></pre>
  
  <p>You say this didn't work for you, could you provide details of what command you tried and what the result was?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T14:09:53.603Z
Answers.Text: When I used quotes like this GET 'domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX'
  
  Nothing happens. Job does not run. I do not get an email. I let it sit through 3 cycles last night and it never ran once.
Answers.UserDisplayName: Tiffany Carra
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T15:12:33.243Z
Answers.Text: Tiffany - can you please clarify whether you're running this command directly on a command line when you test?  Or are you using your webhost's control panel?  If the latter, then there may be a security setting on the webhost's control panel.  If you're testing directly on the command line, please show the output of the command when you use the single quotes?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T16:49:36.187Z
Answers.Text: I am running it on CPanel
Answers.UserDisplayName: Tiffany Carra
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-28T11:27:16.513Z
Answers.LastActivityDate: 2015-08-28T11:27:16.513Z
Answers.UserDisplayName: davejenx
Answers.Body: <p>This was a permissions issue with my webhost like davejenx suggested. Quick fix via support chat.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-29T02:09:53.690Z
Answers.LastActivityDate: 2015-08-29T02:09:53.690Z
Answers.UserDisplayName: Tiffany Carra
Body: <p>When I run my cron job, wget -O - -q -t 1 domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXXXX    </p>
  
  <p>When I use this link in my browser it works just fine no issue, so the key is valid. I get the same error when running GET domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&amp;pass=XXX&amp;key=XXXXX</p>
  
  <p>I can't seem to use single quotes or it stops running altogether. A FQDN and I get a JSON error in the cron setup.</p>
  
Tags: <wordpress><cron-job><scheduling>
Title: Getting ERROR: You need to send a valid key to execute this file when running Cron
ThreadText: # Getting ERROR: You need to send a valid key to execute this file when running Cron
  
  (Asked by: username_0 on 2015-08-28)
  
  When I run my cron job, wget -O - -q -t 1 domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX
  
  When I use this link in my browser it works just fine no issue, so the key is valid. I get the same error when running GET domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX
  
  I can't seem to use single quotes or it stops running altogether. A FQDN and I get a JSON error in the cron setup.
  
  **Tags:** wordpress, cron-job, scheduling
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-08-28. Score: 2 | Accepted answer
  
  Without quotes around the URL, your shell may interpret the '&' character as a request to run a command in the background:
  
  ```
  $ wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX
  [1] 9887
  [2] 9888
  $ jobs
  [1]-  Exit 4                  wget -O - -q -t 1 none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX
  [2]+  Done                    pass=XXX
  $
  
  ```
  
  Here it uses the URL up to but not including the first '&', thus missing the `pass` and `key` parameters. Enclosing the URL in quotes should resolve this:
  
  ```
  $ wget -O - -q -t 1 'none.such/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX'
  $
  
  ```
  
  You say this didn't work for you, could you provide details of what command you tried and what the result was?
  
  > **Comments:**
  > **username_0**: When I used quotes like this GET 'domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXX&pass=XXX&key=XXXXX'  Nothing happens. Job does not run. I do not get an email. I let it sit through 3 cycles last night and it never ran once.  
  > **username_2**: username_0 - can you please clarify whether you're running this command directly on a command line when you test?  Or are you using your webhost's control panel?  If the latter, then there may be a security setting on the webhost's control panel.  If you're testing directly on the command line, please show the output of the command when you use the single quotes?  
  > **username_0**: I am running it on CPanel  
  
  ---
  
  ### Answer by username_0 on 2015-08-29. Score: 0
  
  This was a permissions issue with my webhost like username_1 suggested. Quick fix via support chat.
  
  
  ---
  
  