hostgroup scanning works.
[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                 foreach($CRON_CLASSES as $crons) {
19                         $calling = new $crons($this->config);
20                         if(method_exists($crons, "cron")) {
21                                 echo "<font color=\"green\">CRON: Calling $crons"."->cron:</font><br>";
22                                 echo "<table><tr><td><font color=\"green\">$crons</font></td><td>";
23                                 $calling->cron();
24                                 echo "</td></tr></table>";
25                         } else {
26                                 echo "<font color=\"red\">CRON: would call $crons"."->cron but it doesnt exist</font><br>";
27                         }
28                         
29                 }
30                 echo "</html>";
31         }
32         
33         private $config;
34 }
35
36
37 ?>