You are here

function piwik_cron in Piwik Web Analytics 5

Same name and namespace in other branches
  1. 8 piwik.module \piwik_cron()
  2. 6.2 piwik.module \piwik_cron()
  3. 6 piwik.module \piwik_cron()
  4. 7.2 piwik.module \piwik_cron()
  5. 7 piwik.module \piwik_cron()

Implementation of hook_cron().

File

./piwik.module, line 435

Code

function piwik_cron() {

  // Regenerate the piwik.js every day.
  if (time() - variable_get('piwik_last_cache', 0) >= 86400) {
    file_delete(file_directory_path() . '/piwik/piwik.js');
    variable_set('piwik_last_cache', time());
  }
}