MichaelXavier / cron

Cron data structure and parser for Haskell
Other
53 stars 33 forks source link

Stop a single exception from killing a whole cron thread #19

Closed andrewthad closed 9 years ago

andrewthad commented 9 years ago

At present, if a cron job does something that causes it to throw an exception in IO (like making an API call to a web server that happens to be down), the whole thread gets killed. This means that the job quits running until the application is restarted. This PR prevents that behavior from occurring.

MichaelXavier commented 9 years ago

This seems like an OK solution for now. The part I like about this is if you have long running tasks, there's no way that fact can interfere with how often they run. The downside here is there is no hope of the user handling exceptions from these actions. Would you mind adding documentation to this effect? Beyond that, I'm happy to merge this. Thanks!

andrewthad commented 9 years ago

No problem. I'll add some documentation to the function.

andrewthad commented 9 years ago

Done.