PHP Classes

File: web/SSO/modules/cron/hooks/hook_cron.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/modules/cron/hooks/hook_cron.php   Download  
File: web/SSO/modules/cron/hooks/hook_cron.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 481 bytes
 

Contents

Class file image Download
<?php
/**
 * Hook to run a cron job.
 *
 * @param array &$croninfo Output
 */
function cron_hook_cron(&$croninfo) {
   
assert('is_array($croninfo)');
   
assert('array_key_exists("summary", $croninfo)');
   
assert('array_key_exists("tag", $croninfo)');

   
$cronconfig = SimpleSAML_Configuration::getConfig('module_cron.php');
   
    if (
$cronconfig->getValue('debug_message', TRUE)) {

       
$croninfo['summary'][] = 'Cron did run tag [' . $croninfo['tag'] . '] at ' . date(DATE_RFC822);
    }

}
?>