You are here

function biblio_cron in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 biblio.module \biblio_cron()
  2. 7 biblio.module \biblio_cron()
  3. 7.2 biblio.module \biblio_cron()

Implements hook_cron().

2 string references to 'biblio_cron'
biblio_delete_orphan_authors in includes/biblio.contributors.inc
biblio_delete_orphan_keywords in includes/biblio.keywords.inc

File

./biblio.module, line 234
Main file for Drupal module biblio.

Code

function biblio_cron() {
  require_once drupal_get_path('module', 'biblio') . '/includes/biblio.contributors.inc';
  require_once drupal_get_path('module', 'biblio') . '/includes/biblio.keywords.inc';

  // Defaults to a value of daily (24*60*60 or 86,400 seconds).
  $interval = variable_get('biblio_orphan_clean_interval', 86400);
  if (time() >= variable_get('biblio_orphan_clean_next_execution', 0)) {
    biblio_delete_orphan_authors();
    biblio_delete_orphan_keywords();
    variable_set('biblio_orphan_clean_next_execution', time() + $interval);
  }
}