fix(crontab): execute lms jobs once a day mo - fri

This commit is contained in:
David Mosbach 2023-11-22 03:03:24 +00:00
parent 0331010ad7
commit c393992ffe

View File

@ -392,30 +392,31 @@ determineCrontab = execWriterT $ do
-- , cronNotAfter = Right . CronTimestamp . utcToLocalTimeTZ appTZ $ addUTCTime appStudyFeaturesRecacheRelevanceInterval nextIntervalTime
-- }
whenIsJust appQualificationCheckHour $ \hour -> tell $ HashMap.singleton
(JobCtlQueue JobLmsQualificationsEnqueue)
Cron
{ cronInitial = CronAsap -- time after scheduling
, cronRepeat = CronRepeatScheduled $ cronCalendarAny { cronDayOfWeek = CronMatchSome . impureNonNull . Set.fromList $ [1..7]
, cronRepeat = CronRepeatScheduled $ cronCalendarAny { cronDayOfWeek = CronMatchSome . impureNonNull . Set.fromList $ [1..5]
, cronHour = cronMatchOne hour -- cronHour = CronMatchSome (impureNonNull $ Set.fromList [3,15] )
, cronMinute = cronMatchOne 3
, cronSecond = cronMatchOne 27
}
, cronRateLimit = nominalDay / 2 -- minimal time between two executions, before the second job is skipped
, cronNotAfter = Left $ 1.5 * nominalDay -- maximal delay of an execution, before it is skipped entirely
, cronRateLimit = 0 -- minimal time between two executions, before the second job is skipped
, cronNotAfter = Right CronNotScheduled -- maximal delay of an execution, before it is skipped entirely
}
whenIsJust appQualificationCheckHour $ \hour -> tell $ HashMap.singleton
(JobCtlQueue JobLmsQualificationsDequeue)
Cron
{ cronInitial = CronAsap -- time after scheduling
, cronRepeat = CronRepeatScheduled $ cronCalendarAny { cronDayOfWeek = CronMatchSome . impureNonNull . Set.fromList $ [1..7]
, cronRepeat = CronRepeatScheduled $ cronCalendarAny { cronDayOfWeek = CronMatchSome . impureNonNull . Set.fromList $ [1..5]
, cronHour = cronMatchOne hour -- cronHour = CronMatchSome (impureNonNull $ Set.fromList [3,15] )
, cronMinute = cronMatchOne 33
, cronSecond = cronMatchOne 27
}
, cronRateLimit = nominalDay / 2 -- minimal time between two executions, before the second job is skipped
, cronNotAfter = Left $ 1.5 * nominalDay -- maximal delay of an execution, before it is skipped entirely
, cronRateLimit = 0 -- minimal time between two executions, before the second job is skipped
, cronNotAfter = Right CronNotScheduled -- maximal delay of an execution, before it is skipped entirely
}
let