You are here

function demo_reset_cron in Demonstration site (Sandbox / Snapshot) 6

Same name and namespace in other branches
  1. 7 demo_reset/demo_reset.module \demo_reset_cron()

Implementation of hook_cron().

File

./demo_reset.module, line 171
Demonstration site reset module.

Code

function demo_reset_cron() {
  if ($interval = variable_get('demo_reset_interval', 0)) {

    // See if it's time for a reset.
    if (time() - $interval >= variable_get('demo_reset_last', 0)) {
      demo_reset(variable_get('demo_dump_cron', 'demo_site'), FALSE);
    }
  }
}