You are here

function classified_cron in Classified Ads 6.3

Same name and namespace in other branches
  1. 7.3 classified.module \classified_cron()

Implements hook_cron().

Order of operations is important: purge have the highest priority, then expiration, which should only happen on non-already-purged node, then notifications, from the closest to deletion to the farthest one.

1 call to classified_cron()
ClassifiedNotificationsTest::test1441396 in tests/classified_notifications.test
Issue #1441396.

File

./classified.module, line 801
A pure D6 classified ads module inspired by the ed_classified module.

Code

function classified_cron($time = NULL) {
  module_load_include('scheduled.inc', 'classified');
  $time = _classified_get_time($time);
  module_load_include('inc', 'classified', 'classified.scheduled');
  _classified_scheduled_build_purge($time);
  _classified_scheduled_build_expire($time);
  foreach (_classified_get_notify_kinds() as $kind) {
    _classified_scheduled_build_notify($kind, $time);
  }
}