You are here

function demo_reset_cron in Demonstration site (Sandbox / Snapshot) 7

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

Implementation of hook_cron().

File

demo_reset/demo_reset.module, line 176
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 (REQUEST_TIME - $interval >= variable_get('demo_reset_last', 0)) {
      demo_reset(variable_get('demo_dump_cron', 'demo_site'), FALSE);
    }
  }
}