I'm trying to setup the Job Scheduler so that specific actions can be checked against cron every minute to allow for publishing content on a scheduled basis.

I'm working on part of an Acquia Cloud setup and whilst I've seen that there is documentation about setting up custom jobs, I don't want every cron activity to run, only the job_scheduler_cron, but I don't know how to write the script to only run that code

I've got Ultimate Cron ready to go into a new release but that would have to be rolled into all of the active sites, is there a way of writing a crontab job that only looks for the 'job_scheduler_cron' instead of just modifying the standard Drupal one to once per minute?

  • drush ev 'job_scheduler_cron()'?
    – Andy
    Commented Apr 24 at 15:26
  • @Andy would that throw an error if the module is disabled though? Commented Apr 29 at 10:36
  • Yup. You can add a check to the code passed to drush ev if you want it to work on sites that might not have the module installed.
    – Andy
    Commented Apr 29 at 19:03


Your Answer

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

Browse other questions tagged or ask your own question.