You are here

function biblio_cron in Bibliography Module 7.2

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

Implements hook_cron().

File

./biblio.module, line 160

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';
  $interval = variable_get('biblio_orphan_clean_interval', 24 * 60 * 60);

  //defaults to once per day
  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);
  }
}