I have a scenario where a scheduler, invoked by a cron job, would pick up list of timings at which a file processor should run. The scheduler should invoke the file processor at different timings as picked from the database. The file processor can either be cron jobs or it can be threads. Each file processor will work on independent files and they would update independently. The business scenario is such that you will not have any conditions of deadlock on any resource.
How often do the time-definitions in the database change (update, remove, insert)? Do you like to do this in a 2-step scheduling:
I never created cron-jobs programmatically, but I don't see a problem in creating them from a database.
If jobs get defined typically shortly (few minutes) before the defined time, and have to be executed the same day, I would have a look at the 'at' command.
Or, if you're doing one-shot delayed jobs, use the "at" command.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, that will fit in a stocking