Better Scheduler Than Cron? 66
Chanc_Gorkon asks: "I am looking for an open source job scheduler that is better than cron. I need a scheduler that has dependency checking, preemption (to stop jobs that access the same resources from running at the same time) and -full- logging. Cron e-mails are nice, but I usually end up cleaning them out with out reading. E-mailing the sysadmin -only- when a job does not get kicked off would be the preferable option. I have scoured Freshmeat and Sourceforge and have found nothing that comes close to what I am looking for. Do you guys have some options for me?"
Re:Cron (Score:3, Insightful)
Cron can do the job. Just learn how to use it, and the other unix tools.
Many of the problems you mentioned can be solved with them.
- For the dependencies, you can use make or a similar tool.
- The emails are only sent if the process write to stderr.
Write a wraper script to call the processes you want, and use the shell redirections to send some log to stderr only in the case you want.
You need to write some scripts (Score:4, Insightful)
The features you're talking about are really beyond the range of cron or any other "scheduler." The reason cron exists is to allow you to run jobs at a scheduled time. That's it. If you need to ensure that different cron jobs don't conflict with each other, that's a sign that those jobs need to be combined into a single script. A simple shell script wrapper around the jobs can take care of the logic you need. Just call that wrapper from cron and you should be good.
Re:Write some scripts (Score:1, Insightful)
Personally I use daemontools + makefiles to do complex scheduled tasks. Just write a makefile that does what you need, then create a run file that does "make -C
Embellish with emailing on failure, keeping logs (multilog is good for that), whatever.
Keep it simple, use plain text and/or the filesystem to do your config, easy stuff.
Yet Another /. Oddity (Score:4, Insightful)
What is it with 80% of Slashdot readers? A person asks a question, "What other colors can I paint my bathroom besides white." 80% of the responses run along the lines, "There's nothing wrong with the color white, you just need to coordinate better with the color white." Do recent Slashdot readers and posters not understand how to answer a question?
For Gods sake the guy asks for alternatives to Cron, not a fucking explanation on how Cron can be used to fulfill the criteria. It never ceases to amaze me on the behavior of Slashdot posters.
"I am looking for an open source job scheduler that is better than cron." You'll note it doesn't read, "How do I use Cron to do X." First we had to blast people with RTFA, RTFP, RTFM, RTSYW (Read the shit you write) and any other obscure reference we can invent. This is clearly a case of RTFP.
Honestly who here would be happy walking into a restaurant and ordering a steak only to get a piece of chicken and an 8 minute lecture by the waitress explaining that you just need to season the chicken properly rather then eating steak. When I order a steak I don't want a dissertation by the obviously vegan-hippie waitress on the horrors of animal slaughtering and the need to release cattle into the wild because they're the "Whales of the Great Plains." I want the bitch to ask me if I want it burnt, tough like leather, or crawling away to escape!
How about going to an auto dealership and asking to look at trucks only to be lead to a compact 2 door Yugo with a trailer attached with bungie cords and masking tape! Fuck just answer the poor guy's question.
--- / END RANT ---
Here at my current client's location we built a home-brewed scheduler using PERL and POSTGRES. Jobs can be scheduled with a full range of options including every X minutes, hours, and so on along with LAST DAY OF MONTH. The development time was only about 3 weeks if you can devote that kind of time otherwise several people (Who apparently do know how to answer a question) have posted some great links on some alternatives.
Re:Yet Another /. Oddity (Score:3, Insightful)
When you say "What's good today? I want something that tastes like steak, but is spicy..." then the waitress is answering your question properly when she says "We can put enough spice on the steak to burn your mouth off." She doesn't deserve several dozen rants (also common on Slashdot) about how you said you didn't want steak!
Now, one more thing before I'm done. When you ask a question, you don't ask questions like "How do I use X to do Y?" You ask questions like "How do I do Y? I think you can do it with X." Instead of "How do I do Y without using X?" you say "I'm trying to do Y, and X doesn't seem to be working."
When you are looking for help, you state your question clearly, based on your needs, not your assumptions. 80% of the people on Slashdot can spot those assumptions, but it's still damn annoying.