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?
1 Answer
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 for details.
Administrator credentials will work, or you can set up a dedicated user for cron.
-
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? Commented Apr 22, 2021 at 13:19
-
Suggest you use something like cron-job.org/en to get the job working while you debug– GrahamCommented Jan 11, 2022 at 17:28