getReports() as $report) { if (!$report['deleted'] && $report['period'] != Schedule::PERIOD_NEVER) { $schedule = Schedule::getScheduledTimeForPeriod($report['period']); $schedule->setHour($report['hour']); $schedule->setTimezone('UTC'); // saved hour is UTC always $this->custom(API::getInstance(), 'sendReport', $report['idreport'], $schedule); } } } }