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.