Answers.Body: <p>Welcome to SE!  The message is &quot;Could not open input file&quot; so the problem is finding the files it needs to run, not the username/password.  What is 'my_php_script' in the cron entry?  Does the cron entry literally include '[mysite]' or is that where you have redacted your site name?</p>
  <p>There are several ways to run scheduled jobs but I suggest you use the 'cv' method if you can.  See the <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#commands" rel="nofollow noreferrer">documentation</a> for details.</p>
  <p>Administrator credentials will work, or you can set up a dedicated user for cron.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-22T13:19:59.613Z
Answers.Text: Still having trouble with cron not running. I have tried many configs on my server's Anacron component (which only accepts the @ for frequency). the latest is :1@hourly 0 php -f /srv/data/web/vhosts/[mysite]/htdocs/wp-content//plugins/civicrm/civicrm/bin/cron.php ([mysite] is my redaction), but now the log says: hp: /bin/sh: 0: Illegal option - 
  by the way. i can't use the cv method....any advice?
Answers.UserDisplayName: Hilary Binder
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-11T17:28:45.917Z
Answers.Text: Suggest you use something like https://cron-job.org/en/ to get the job working while you debug
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-16T08:43:23.667Z
Answers.LastActivityDate: 2021-04-16T08:43:23.667Z
Answers.UserDisplayName: Aidan
Body: <p>I am trying to run all cron jobs at a one hour interval, but I keep getting &quot;Could not open input file&quot;. my path: @hourly 0 my_php_script php -f /srv/data/web/vhosts/[mysite]/wp-content/htdocs/plugins/civicrm/civicrm/bin/cron.php.
  I am using the admin credentials for the database, which are the same for wordpress, and as administrator in Civi.
  Are there other credentials I need to use?</p>
  
Tags: <error><cron>
Title: username and password invalid on cronjob setup through anacron on server control panel
ThreadText: # username and password invalid on cronjob setup through anacron on server control panel
  
  (Asked by: username_0 on 2021-04-15)
  
  I am trying to run all cron jobs at a one hour interval, but I keep getting "Could not open input file". my path: @hourly 0 my\_php\_script php -f /srv/data/web/vhosts/[mysite]/wp-content/htdocs/plugins/civicrm/civicrm/bin/cron.php.
  I am using the admin credentials for the database, which are the same for wordpress, and as administrator in Civi.
  Are there other credentials I need to use?
  
  **Tags:** error, cron
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-04-16. Score: 0
  
  Welcome to SE! The message is "Could not open input file" so the problem is finding the files it needs to run, not the username/password. What is 'my\_php\_script' in the cron entry? Does the cron entry literally include '[mysite]' or is that where you have redacted your site name?
  
  There are several ways to run scheduled jobs but I suggest you use the 'cv' method if you can. See the [documentation](https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#commands) for details.
  
  Administrator credentials will work, or you can set up a dedicated user for cron.
  
  > **Comments:**
  > **username_0**: Still having trouble with cron not running. I have tried many configs on my server's Anacron component (which only accepts the @ for frequency). the latest is :1@hourly 0 php -f /srv/data/web/vhosts/[mysite]/htdocs/wp-content//plugins/civicrm/civicrm/bin/cron.php ([mysite] is my redaction), but now the log says: hp: /bin/sh: 0: Illegal option -  by the way. i can't use the cv method....any advice?  
  > **username_2**: Suggest you use something like https://cron-job.org/en/ to get the job working while you debug  
  
  ---
  
  