You are here

hook_cron_schedule_alter.html in Ultimate Cron 6

File

help/hook_cron_schedule_alter.html
View source
<p>The hook_cron_schedule_alter(&$hooks) allows you to change the cron hooks that are scheduled to be run.</p>

<h3>Example</h3>
<p>Don't run node_cron if 2 + 2 = 4</p>
<pre>
function hook_cron_schedule_alter(&$hooks) {
  if (2 + 2 = 4) {
    unset($hooks['node_cron']);
  }
}
</pre>