I have a scheduled job, iATS Payments Recurring Contributions, set to run daily. Currently, the job fires off right after midnight every day. However, we need it to happen later -- say, around 3am.

Cron runs drush civicrm-api job.execute twice an hour, triggering any scheduled jobs that are due to run.

I know I can create a separate cron job at the desired time for this particular iATS scheduled job. However the iATS job may still get swept up by the catch-all civicrm-api job.execute and run at a different time, right?

  • 1
    You could disable the job and then add another cron job with drush where you replace job.execute by the entity and action of the specific job Commented Dec 3, 2015 at 22:12
  • Thank. So the enabled/disabled status isn't respected when calling the job directly via the API? Commented Dec 3, 2015 at 23:46
  • I would assume so Commented Dec 4, 2015 at 9:41
  • Is there a way to call a specific job via a URL?
    – Yossi
    Commented Sep 9, 2016 at 19:44
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review Commented Sep 12, 2016 at 10:26

2 Answers 2


The solution is to exclude the iATS job from the "normal catch all" cronjob (so don't put it to run automatically daily)

Then add a line on your cron to run it at 3 am

0 3 * * * www-data nice -n19 /usr/bin/drush -u 1 -r $drupal_root civicrm-api job.whatever-iats-name auth=0 -y

You will need to find what is the name of the iats api job, and put it in the line

and voila, you should have it working now at 3 am

  • Yes, and two caveats: 1. the recurring contribution job has a managed record, so in some versions it can re-enable itself. 2. iATS runs it own recurring contributions at 3am PST, so you likely don't want to choose that exact time, though it might be okay.
    – Alan Dixon
    Commented Jan 14, 2016 at 14:41
  • This is indeed the solution we're using, and it works. Just a note, though: individual jobs run directly from cron won't leave an entry in the Job Log. I decided to have the cron job call an intermediate shell script, which logs the job's result to the log. Also, this solution is confusing to our civi admin, because the job is "disabled" on the "scheduled jobs" page, and yet it still runs (through the special 3am cron job I created). I've edited the title/description of the job on that page to make the situation clearer for the admin. Thanks for the iATS-specific tips, @AlanDixon Commented Apr 4, 2016 at 6:03
  • If you want to sue the CURL method, the curl looks like this "example.com/sites/all/modules/civicrm/bin/…"' Commented Apr 30, 2019 at 10:46

If you want to sue the CURL method, the curl looks like this


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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