You are here

function matomo_cron in Matomo Analytics 7.2

Same name and namespace in other branches
  1. 8 matomo.module \matomo_cron()

Implements hook_cron().

File

./matomo.module, line 461
Drupal Module: Matomo

Code

function matomo_cron() {

  // Regenerate the matomo.js every day.
  if (REQUEST_TIME - variable_get('matomo_last_cache', 0) >= 86400 && variable_get('matomo_cache', 0)) {
    _matomo_cache(variable_get('matomo_url_http', '') . 'matomo.js', TRUE);
    variable_set('matomo_last_cache', REQUEST_TIME);
  }
}