110 'Manual Run is Always Due' => [
113 JobScheduleType::DAILY,
115 JobScheduleType::DAILY,
120 JobScheduleType::DAILY,
124 'Job Without Any Run is Always Due' => [
127 JobScheduleType::DAILY,
129 JobScheduleType::DAILY,
134 JobScheduleType::DAILY,
138 'Daily Schedule / Did not run Today' => [
141 JobScheduleType::DAILY,
143 JobScheduleType::DAILY,
150 return self::$now->modify(
'-1 day');
152 JobScheduleType::DAILY,
156 'Daily Schedule / Did run Today' => [
159 JobScheduleType::DAILY,
161 JobScheduleType::DAILY,
170 JobScheduleType::DAILY,
174 'Weekly Schedule / Did not run this Week' => [
177 JobScheduleType::WEEKLY,
179 JobScheduleType::WEEKLY,
186 return self::$now->modify(
'-1 week');
188 JobScheduleType::WEEKLY,
192 'Weekly Schedule / Did run this Week' => [
195 JobScheduleType::WEEKLY,
197 JobScheduleType::WEEKLY,
204 return self::$now->modify(
'monday this week');
206 JobScheduleType::WEEKLY,
210 'Monthly Schedule / Did not run this Month' => [
213 JobScheduleType::MONTHLY,
215 JobScheduleType::MONTHLY,
222 return self::$now->modify(
'last day of last month');
224 JobScheduleType::MONTHLY,
228 'Monthly Schedule / Did run this Month' => [
231 JobScheduleType::MONTHLY,
233 JobScheduleType::MONTHLY,
240 return self::$now->modify(
'first day of this month');
242 JobScheduleType::MONTHLY,
246 'Yearly Schedule / Did not run this Year' => [
258 return self::$now->modify(
'-1 year');
264 'Yearly Schedule / Did run this Year' => [
276 return self::$now->modify(
'first day of January this year');
282 'Quarterly Schedule / Did not run this Quarter' => [
285 JobScheduleType::QUARTERLY,
287 JobScheduleType::QUARTERLY,
294 $offset = (((
int) self::$now->format(
'n')) - 1) % 3;
295 self::$this_quarter_start = self::$now->modify(
"first day of -$offset month midnight");
297 return self::$this_quarter_start->modify(
'-1 seconds');
299 JobScheduleType::QUARTERLY,
303 'Quarterly Schedule / Did run this Quarter' => [
306 JobScheduleType::QUARTERLY,
308 JobScheduleType::QUARTERLY,
315 $offset = (((
int) self::$now->format(
'n')) - 1) % 3;
316 self::$this_quarter_start = self::$now->modify(
"first day of -$offset month midnight");
318 return self::$this_quarter_start->modify(
'+30 seconds');
320 JobScheduleType::QUARTERLY,
324 'Minutely Schedule / Did not run this Minute' => [
327 JobScheduleType::IN_MINUTES,
329 JobScheduleType::IN_MINUTES,
336 return self::$now->modify(
'-1 minute');
338 JobScheduleType::IN_MINUTES,
342 'Minutely Schedule / Did run this Minute' => [
345 JobScheduleType::IN_MINUTES,
347 JobScheduleType::IN_MINUTES,
354 return self::$now->modify(
'-30 seconds');
356 JobScheduleType::IN_MINUTES,
360 'Hourly Schedule / Did not run this Hour' => [
363 JobScheduleType::IN_HOURS,
365 JobScheduleType::IN_HOURS,
372 return self::$now->modify(
'-7 hours');
374 JobScheduleType::IN_HOURS,
378 'Hourly Schedule / Did run this Hour' => [
381 JobScheduleType::IN_HOURS,
383 JobScheduleType::IN_HOURS,
390 return self::$now->modify(
'-7 hours +30 seconds');
392 JobScheduleType::IN_HOURS,
396 'Every 5 Days Schedule / Did not run for 5 Days' => [
399 JobScheduleType::IN_DAYS,
401 JobScheduleType::IN_DAYS,
408 return self::$now->modify(
'-5 days');
410 JobScheduleType::IN_DAYS,
414 'Every 5 Days Schedule / Did run withing the last 5 Days' => [
417 JobScheduleType::IN_DAYS,
419 JobScheduleType::IN_DAYS,
426 return self::$now->modify(
'-4 days');
428 JobScheduleType::IN_DAYS,
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null