You are here

function piwik_cron in Piwik Web Analytics 6.2

Same name and namespace in other branches
  1. 8 piwik.module \piwik_cron()
  2. 5 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 311
Drupal Module: Piwik

Code

function piwik_cron() {

  // Regenerate the piwik.js every day.
  if (time() - variable_get('piwik_last_cache', 0) >= 86400 && variable_get('piwik_cache', 0)) {
    _piwik_cache(variable_get('piwik_url_http', '') . '/piwik.js', TRUE);
    variable_set('piwik_last_cache', time());
  }
}