hook_cron_pre_execute.html in Ultimate Cron 7
File
help/hook_cron_pre_execute.html
View source
<p>The hook_cron_pre_execute($function, &$hook) is invoked just before running the cron function.</p>
<h3>Example</h3>
<p>Call another function instead of the defined</p>
<pre>
function hook_cron_pre_execute($function, &$hook) {
if ($function == 'node_cron') {
$hook['callback'] = 'mymodule_steal_cron_function_from_node_module';
}
}
function mymodule_steal_cron_function_from_node_module() {
error_log('PWNED');
}
</pre>