0

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

abc_xyz_cron(){

}

zzz_yyy_cron(){

}
1
  • can any one help me please ?
    – Shrikant
    Commented Apr 5, 2017 at 21:46

1 Answer 1

1

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

1

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.