function ed_classified_cron in Classified Ads 7.2
Same name and namespace in other branches
- 5.2 ed_classified.module \ed_classified_cron()
- 5 ed_classified.module \ed_classified_cron()
- 6.2 ed_classified.module \ed_classified_cron()
Implementation of hook_cron().
File
- ./
ed_classified.module, line 166 - Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights…
Code
function ed_classified_cron() {
module_load_include('inc', 'ed_classified', 'ed_classified_utils');
module_load_include('inc', 'ed_classified', 'ed_classified_delete');
// only when we need to delete
module_load_include('inc', 'ed_classified', 'ed_classified_notifications');
// only when we need to send a notification
$time = REQUEST_TIME;
// Auto-repair taxonomy association
_ed_classified_get_vid(TRUE);
/* Process reminder mails as needed */
if (_ed_classified_variable_get('send_email_reminders', EDI_CLASSIFIED_VAR_DEF_SEND_EMAIL_REMINDERS)) {
_ed_classified_process_notification_emails($time);
}
_ed_classified_expire_ads($time);
// purge old ads if possible
_ed_classified_purge();
}