You are here

function word_link_exchange_cron in Word Link 7

Same name and namespace in other branches
  1. 8 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_cron()
  2. 7.2 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() {

  // Sccan public directory for word-link csv files and delete 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/');
  if (!empty($file_list)) {
    foreach ($file_list as $file) {
      file_unmanaged_delete($file->uri);
    }
  }
}