#! /usr/bin/php -f setError('Unable to get list of projects using SCM: '.db_error()); return false; } $output = ''; while ($data = db_fetch_array ($res)) { print "Processing GroupId ".$data['group_id']." (".$data['group_name'].")\n"; $time = $starttime; $etime = $endtime; if ( isset($options['all']) ) { $time = date($data['register_time']); $etime = time(); } if ( isset($options['allepoch']) ) { $time = 0; $etime = time(); } $last_seen_day = '' ; while ($time < $etime) { $day = date ('Y-m-d', $time) ; if ($day != $last_seen_day) { $last_seen_day = $day ; ($verbose) && print "processing $day\n" ; $hook_params = array ('group_id' => $data['group_id'], 'mode' => 'day', 'year' => date ('Y', $time), 'month' => date ('n', $time), 'day' => date ('j', $time)) ; plugin_hook ('scm_gather_stats', $hook_params) ; } $time = $time + 86400 ; } } if ($output) cron_entry(28, $output); // Local Variables: // mode: php // c-file-style: "bsd" // End: