I have tried running a cron job in drupal 7.43 and civicrm 4.7.7 with no success. I have a scheduled job: Home » CiviCRM » Administer CiviCRM » Scheduled Jobs (Send Scheduled Mailings) with setting Run frequency "Every time cron job is run" (BTW the job runs if I use Execute now)(I have also set at 1 hour intervals) In Drupal; Home » Administration » Configuration » System > CRON it is set to run every hour and does so. I also can run it from the external URL. When I run the Drupal CRON it has no effect on the Civicrm scheduled job and Civicrm complains each time I log in to Civicrm; "Cron Not Running - Last cron run at May 16th, 2016 4:48 PM." which is the last time I executed it manually (Execute now). I am doing this as administrator with all permissions.
You need to set a cron command on the server.
https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs
Something like
*/15 * * * * wget -O - -q -t 1 'http://mysite.org/sites/all/modules/civicrm/bin/cron.php?name=username&pass=password&key=site-key'
If you have set it, what is the exact cron command for CiviCRM you have set on the server (cpanel, directadmin ....)? (You can leave out the pwd)
-
In the Cpanel from my host CRON documentation it gives an example "/home/user/public_html/index.php" . Can I use your example given above instead of this format? I have used the pass key from civicrm.settings.php located in /sites/default here is the command line: */5 * * * * wget -O - -q -t 1 'http://mysite.com/drupal/sites/all/modules/civicrm/bin/… – Hock May 22 '16 at 22:45
-
Please do no use the info from your civicrm.settings.php. You need to create a user in Drupal (e.g. civicron) and set a password to this user. The user must have enough permissions in CiviCRM to do the scheduled job. Use the name and password form this user for the cron call. – samuelsov Sep 19 '16 at 13:12