/[web]/data/cron/daily.php
ViewVC logotype

Contents of /data/cron/daily.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1526 - (show annotations) (download)
Mon Jul 30 00:06:03 2012 UTC (11 years, 8 months ago) by rda
File size: 851 byte(s)
cron script
1 <?php
2 /**
3 * Run fetch/digest/publish scripts for Mageia.org logs.
4 */
5
6 /** */
7 date_default_timezone_set('Europe/Paris');
8
9 $params = array(
10 'Downloads' => array('downloads', 'rda', 'www.mageia.org'),
11 'Releases' => array('releases', 'rda', 'releases.mageia.org')
12 );
13
14 $dt0 = new DateTime();
15
16 // all data extraction/migration scripts should be there
17 require '../lib/Mageia/Data/Cron.php';
18 foreach (glob('../lib/Mageia/Data/Cron/*.php') as $class)
19 require $class;
20
21 $classes = array_filter(get_declared_classes(), function ($e) {
22 return preg_match('/Mageia_Data_Cron_(.*)/', $e);
23 });
24
25 foreach ($params as $k => $p) {
26 $c = 'Mageia_Data_Cron_' . $k;
27 $cl = new $c($p, strtotime('-1 day'), __DIR__, 'tmplogs');
28 $cl->run();
29 }
30
31 $dt1 = new DateTime();
32 $dt = $dt0->diff($dt1);
33 echo "It took ", $dt->format("%R%Hh %Imin %Ss"), "\n";
34
35
36

  ViewVC Help
Powered by ViewVC 1.1.30