function word_link_exchange_cron in Word Link 7.2
Same name and namespace in other branches
- 8 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_cron()
- 7 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_cron()
Implements hook_cron().
File
- modules/
word_link_exchange/ word_link_exchange.module, line 39 - Code for the Word link exchange module.
Code
function word_link_exchange_cron() {
// Scan public directory for word-link csv files and deletes it.
$file_list = file_scan_directory('public://', '/word_link_[0-9]{2}_[0-9]{2}_[0-9]{4}T[0-9]{2}_[0-9]{2}(|_[0-9]{1,2}).csv/', array(
'recurse' => FALSE,
));
if (!empty($file_list)) {
foreach ($file_list as $file) {
file_unmanaged_delete($file->uri);
}
}
}