-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Thanks in advance of my request for a really useful scheduling library.
Is there any scope to extend cron so that the time it has been scheduled for is passed to the job?
Ie so the Job definition becomes something like:
data Job = Job CronSchedule (UTCTime -> IO ())
This way, systems relying on cron can be tested independently of the current wall clock time...
I realise this would break plenty of code, but maybe there is a way to add it without doing so?
Maybe something like:
data Job = Job CronSchedule (IO ())
| JobWithTime CronSchedule (UTCTime -> IO ())
I'm using a fork at https://github.com/joehealy/cron/tree/pass_time_to_jobs to achieve this, but without the backwards compatibility.
Metadata
Metadata
Assignees
Labels
No labels