Job Scheduling - crontab the best solution?
I am in the middle of developing a web-based application that heavily depends on job scheduling. The jobs will be extremely short, such as a single HTTP request. However, there will be lots of them. More than several thousand jobs may be scheduled every single day, but not all at the same time. My first inclination was use to crontab to sche开发者_开发知识库dule these jobs, but I am not sure if this is the best solution.
I see crontab mainly being used to schedule work intensive administrative tasks, but not for very short jobs. Is crontab even suitable for that? Can it handle such a large number of jobs? Should I implement a custom solution? Are there any services out there that may provide a better solution & performance?
Thank you very much!
That's what I use for my personal website. Sure, cron has the ability to run long-running tasks, but it should by no means be limited to that.
Cron has a resolution of one minute; it only wakes up once per minute to see if anything should be run. If you need something with tighter resolution, you'll need a custom solution.
Also, if you are doing this on OS X you will be using launchd rather than cron. (cron is still supported, though).
My company makes CloudQuartz (www.thecloudblocks.com) which allows you to schedule the jobs through an API and get callbacks when they are due to run.
We made it so we can schedule jobs on a cluster of servers that was not possible using CRON or Windows scheduler.
精彩评论