3

I can only get scheduled jobs to run manually, with the "Execute now" button. Hourly won't work let alone with an external method like php.cli method. Is there a way to troubleshoot this? I just started logging civi errors to drupal watchdog....so hopefully I'll have more info soon.

Thank you

2

The PHP CLI method is one of several ways to run all scheduled jobs automatically. If you haven't configured a cron job, the scheduled jobs will not run on their own. Because nothing is actually happening, there will be no log entries to say that your cron isn't set up.

Select one of the methods for triggering scheduled jobs from the command line. Since you're on Drupal, you might try the Drush method because it's fairly easy. Regardless, if for some reason your command fails, you should get some sort of message that you can use for finding more specific help.

(A tip for testing: make sure you have at least one scheduled job enabled and set to run "Always". If everything's hourly or daily, it's hard to test if it has executed.)

Once you find a command that works, set it up as a cron job so it runs every 5-15 minutes. At that point, you'll be able to go back and check if the scheduled jobs are working as expected.

0

If you are on Linux and using Drush you can set a cron job:

Example, create a file as root under /etc/cron.d/run-civi-jobs

With contents:

*/15 * * * * www-data cd path/to/drupal && /usr/local/bin/drush --quiet civicrm-api -u 1 job.execute

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.