hook_cron_pre_execute.html 434 B

123456789101112131415
  1. <p>The hook_cron_pre_execute($function, &$hook) is invoked just before running the cron function.</p>
  2. <h3>Example</h3>
  3. <p>Call another function instead of the defined</p>
  4. <pre>
  5. function hook_cron_pre_execute($function, &$hook) {
  6. if ($function == 'node_cron') {
  7. $hook['callback'] = 'mymodule_steal_cron_function_from_node_module';
  8. }
  9. }
  10. function mymodule_steal_cron_function_from_node_module() {
  11. error_log('PWNED');
  12. }
  13. </pre>