anyone know a convenient lib or something in haskell to schedule future one-off jobs that doesn't just spawn threads/need to stay running
-
-
"cron" library seems to just be a parser and persistent scheduler, there's "hcron" which is dead/unfinished, and a bunch of thread-spawners
-
I guess I could just write to a file and have a separate cron job that polls it every second but that seems dumb
-
Use a lock file. Check for existence on startup
End of conversation
New conversation -
-
-
you could just use at for the conditional jobs and cron only for the main one
-
wtf I didn't know at was a thing
-
noob
-
love you
End of conversation
New conversation -
-
-
normally I just use optparse-applicative to throw together a cmd line utility & call it from a cron job
-
that is what I'm doing in that it's just one program with cmd line switches deciding it's behavior
-
but other than the building the schedule itself events could occur at any time
-
(the actual usecase is tweeting celestial events and it'd be cool if it tweeted them the second they occurred)
-
looks like you can use `at` to schedule one-off future jobs.https://tecadmin.net/one-time-task-scheduling-using-at-commad-in-linux/ …
-
I'd combine a cron'd scheduler script that runs ~weekly and registers jobs for the week's celestial event tweets via `at` & another script
- End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.