You are here

function biblio_cron in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 biblio.module \biblio_cron()
  2. 7 biblio.module \biblio_cron()
  3. 7.2 biblio.module \biblio_cron()
2 string references to 'biblio_cron'
biblio_delete_orphan_authors in ./biblio.contributors.inc
biblio_delete_orphan_keywords in ./biblio.keywords.inc

File

./biblio.module, line 166

Code

function biblio_cron() {
  require_once drupal_get_path('module', 'biblio') . '/biblio.contributors.inc';
  require_once drupal_get_path('module', 'biblio') . '/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);
  }
}