I have spent the last two weeks trying to get Cron Jobs with cPanel run Scheduled Jobs in CiviCRM. Literally everything I have tried does not work as a command in Cron Jobs but when using SSH I have been able to get this to trigger the job to run:
wget -q -O - "http://website.com/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=websiteAdmin&pass=websiteAdminPassword&key=1234567912345678912345678912345"
But when I take this exact command that works via SSH and put it into Cron Jobs I get an email stating:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
My next idea was to remove the quotation marks before and after the link, which then failed due to invalid token, the password has symbols in it, so I escaped them using \ before each special character. Then I get:
ERROR: You need to send a valid key to execute this file. More info at:http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs
At this point, I know for a fact the key is correct since this command runs via SSH and the key never changed every time so far. The escaped characters are only within the password.
I have tried many other things but I figured a log file explanation might be overkill, anyone have any ideas?
Using: cPanel version 11.52.3 (build 1) CiviCRM version 4.6 WordPress 4.4.2
\&pass...\&key...
ERROR: You need to send a valid user name and password to execute this file
That was a good idea, I thought for sure it would solve it too. Using: cPanel version 11.52.3 (build 1) CiviCRM version 4.6wp eval-file http://website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php name=websiteAdmin pass=websiteAdminPassword key=1234567912345678912345678912345 --path=/home8/farrnetw/public_html/
It returns:Fatal error: Class 'WP_Widget' not found in /home8/thing/public_html/wp-content/plugins/image-widget/image-widget.php on line 25
I did som checking around and all I can find is people having install issues, which is not the case here since this has been upwget -O /dev/null -q -t 1 'http://website.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=web_admin&pass=web_pass&key=web_key'
but i had to only escape a % symbol that was in the password and not escape any of the other special characters.