Skip to main content
improved grammar
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Where To Place Hook_crondo I place hook_cron()?

I don't get it ... I think I need to use hook_cron()hook_cron() to cause my new module to be run each time cron runs, but in what file and directory do I place this code? Is it in my new module or some other place.

Logically, it would seem that it should go some place other than my module, but I don't know where even though I've looked at documentation from various web sources. It seems like the "chicken & the egg" problem. If I put hook_cron()hook_cron() in my module how does Drupal know to tell cron to run my module? Maybe it's magic??

I'm using Drupal 8.

Where To Place Hook_cron()

I don't get it ... I think I need to use hook_cron() to cause my new module to be run each time cron runs, but in what file and directory do I place this code? Is it in my new module or some other place.

Logically, it would seem that it should go some place other than my module, but I don't know where even though I've looked at documentation from various web sources. It seems like the "chicken & the egg" problem. If I put hook_cron() in my module how does Drupal know to tell cron to run my module? Maybe it's magic??

I'm using Drupal 8.

Where do I place hook_cron()?

I think I need to use hook_cron() to cause my new module to be run each time cron runs, but in what file and directory do I place this code? Is it in my new module or some other place.

Logically, it would seem that it should go some place other than my module, but I don't know where even though I've looked at documentation from various web sources. It seems like the "chicken & the egg" problem. If I put hook_cron() in my module how does Drupal know to tell cron to run my module? Maybe it's magic?

I'm using Drupal 8.

Source Link

Where To Place Hook_cron()

I don't get it ... I think I need to use hook_cron() to cause my new module to be run each time cron runs, but in what file and directory do I place this code? Is it in my new module or some other place.

Logically, it would seem that it should go some place other than my module, but I don't know where even though I've looked at documentation from various web sources. It seems like the "chicken & the egg" problem. If I put hook_cron() in my module how does Drupal know to tell cron to run my module? Maybe it's magic??

I'm using Drupal 8.