I have a custom module abc_xyz and i want to write two seperate cron for this module.

below is the code which i am trying but it is creating only one cron , with name abc_xyz_cron. it is not creating for zzz_yyy_cron

file name : abc_xyz.module




  • can any one help me please ? – Shrikant Apr 5 '17 at 21:46

No. You can implement hooks once per module due to the namespacing of the hook (mymodule_cron). However you can put conditions within the cron hook to do different things.

You might be looking for this instead: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_cron_queue_info/7.x

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.