You are here

function word_link_exchange_cron in Word Link 8

Same name and namespace in other branches
  1. 7.2 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_cron()
  2. 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() {
  $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/');
  if (!empty($file_list)) {
    foreach ($file_list as $file) {
      file_unmanaged_delete($file->uri);
    }
  }
}