Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron-like periodic running interface #45

Open
mightybyte opened this issue Mar 21, 2016 · 1 comment
Open

Cron-like periodic running interface #45

mightybyte opened this issue Mar 21, 2016 · 1 comment

Comments

@mightybyte
Copy link

Would there be any interest in adding some cron-like features to angel? The reason I'm asking is because I have a system where some things are programs that need to stay up all the time (that I would use angel to manage) and some things are programs that need to run periodically in a cron-like fashion. Since I already have angel worked into my deployment it would be convenient to not have to worry about setting up other stuff. You can kind of get that effect just by specifying a long delay. But sometimes you really want the program to run at a specific time and a fixed delay would drift. Another way to do it would be to reformulate my cron-like programs as continuously running programs that just delay for awhile. The problem with this is that there's some extra overhead needed to store the last successful run time so you don't wait too long in the case the program is somehow not running at its check time.

If you feel strongly that this is outside the scope of angel, I won't argue with that. I just thought I'd float the idea and get other thoughts.

@MichaelXavier
Copy link
Owner

Scope is an interesting thing with Angel. I took over as the maintainer years ago and while I've fixed some bugs and added some features, I pretty much don't spend time on it because what it really needs is a rewrite. I actually started a rewrite a while back but that has bit rot and I'm not sure when I'm going to take another look at it.

So this is a long way of saying that I don't have burning opinions on the scope of Angel so I usually defer to the original principles behind it and its standing in the field of other process monitors. Angel is supposed to be very simple and barebones. I don't think the original idea was to do watchdog things like monitoring resource usage, or scheduling things (I don't know of any other process monitors that do that). I have experience with a few ruby process monitors (god, bluepill) and a python one (supervisord). Compared to god and bluepill, Angel's advantage is that its simpler and that probably explains why Angel seems to work reasonably well and why god/bluepill (when I used them) are not reliable, leak memory, etc. supervisord is more complex and has more process admin tools at its disposal, but in my experience works very well. So really the only thing setting Angel apart at the moment is that its written in Haskell and may be easier to maintain if you already have a Haskell stack.

One thing you might want to consider is my cron library. Some nice contributors added a scheduler module to it that can be used to run periodic tasks from within haskell or build a more complex system. I still don't think you can get around storing last run time or something like that to recover from missed schedules, but that's something Angel can help you with so maybe combining these two on your end could be a good solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants