not entirely sure, think its all the messaging components
[glcas.git] / plugins / cron.php
1 <?php
2 global $URL_HANDLERS;
3 $URL_HANDLERS["cron.*"] = "GLCASCron";
4
5 class GLCASCron {
6         function __construct($config)
7         {
8                 $this->config = $config;
9                 error_log("constructor for GLCASCron");
10                 
11         }
12         
13         function go($url)
14         {
15                 global $CRON_CLASSES;
16                 
17                 echo "<html>";
18                 echo "<table border=\"1\">";
19                 foreach($CRON_CLASSES as $crons) {
20                         $calling = new $crons($this->config);
21                         echo "<tr><td>";
22                         if(method_exists($crons, "cron")) {
23                                 echo "<font color=\"green\" size=\"+1\">CRON: Calling cron for $crons</font></td><td>";
24                                 echo "<table><tr><td>";
25                                 $calling->cron();
26                                 echo "</td></tr></table></td></tr>";
27                         } else {
28                                 echo "<font color=\"red\">CRON: would call $crons"."->cron but it doesnt exist</font><br></td></tr>";
29                         }
30                         
31                         
32                 }
33                 echo "</table>";
34                 echo "</html>";
35         }
36         
37         private $config;
38 }
39
40
41 ?>