function classified_cron in Classified Ads 7.3
Same name and namespace in other branches
- 6.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()
- ClassifiedTestNotificationsTest::test1441396 in tests/
classified_test_notifications.test - Issue #1441396.
File
- ./
classified.module, line 844 - A pure D7 classified ads module inspired by the ed_classified module.
Code
function classified_cron($time = NULL) {
// Skip invalid values of time like those submitted by Ultimate Cron.
// @link https://www.drupal.org/node/2468505
if (!is_int($time)) {
$time = NULL;
}
module_load_include('inc', 'classified', 'classified.scheduled');
$time = _classified_get_time($time);
_classified_scheduled_build_purge($time);
_classified_scheduled_build_expire($time);
foreach (_classified_get_notify_kinds() as $kind) {
_classified_scheduled_build_notify($kind, $time);
}
}