I’m developing a drupal module. I’m using only 2 hooks (hook_menu, hook_cron)
-
In hook_menu, I create a menu callback that does a certain function.
-
In hook_cron, the problem resides here. I wanna execute the path I created in hook_menu every time hook_cron runs!
How can I do that?!!!
You can use something like this.
drupal_http_request(url(‘your/path’, array(‘absolute’ => TRUE));
It’s however not clear to me why you can’t simply call an API function in your cron hook, another page request has quite an overhead.