whenjobs - What the?



Reaction score: 473
Messages: 1,205

Well, he says it in the article.

You can't tell cron "when this happens, run this job." For instance, if you want to be notified when you start to run low on disk space, or if the load on a machine is above a certain threshold. You could write scripts that check those things, and then run them frequently. But it'd be better if you could just count on the scheduler to do that for you.

There's also the less than friendly formatting to cron. When I've worked in hosting, I found plenty of cron jobs that were either running too often because the owner mis-formatted the time fields, or that didn't run as often as expected for the same reason. Back up jobs that should have been running daily were running once a month. Oops.
I guess it might be tough to put a few spaced numbers in a text file ... for linux users! :-O

Also of note:
A slight word of warning, you're probably going to need a lot of dependencies to build whenjobs on your own.

I wonder if this will be as successful as HAL?


Aspiring Daemon

Reaction score: 120
Messages: 781

Read about it the other day. (Linuxtoday.com also pointed to the URL you posted.)

Hopefully it'll stagnate and peacefully go away.

"a powerful but simple cron replacement" -- In fact, it appears to be a worse, more complicated cron replacement (with lots of dependencies, apparently). No thank you.



Reaction score: 399
Messages: 2,060

graudeejs said:

The author mentions cron limitations. Can anyone enlighten me what he's talking about?
Well, the "standard" cron has the limitation that it will only work correctly for a machine that is always on; if your machine is off when an event is scheduled, cron won't run it afterwards (ie. in half an hour when you power on your machine). However, this problem has been solved many years ago, and you can just use any suitable replacement for cron if you need this kind of functionality.

To me, it sounds like the "whenjobs" author tries to create one tools for two jobs; both time-scheduled tasks and event-driven tasks. Not very unix-like, if you ask me. But I only took a quick look at the article.


Aspiring Daemon

Reaction score: 167
Messages: 802

Yeah, right. I think that's just reinventing the wheel again. If one cannot write simple script to check utilization, and/or can't get the cron entries right I'd say problem is between chair and keyboard.

And anyway, in principle I think it does the same thing as any cron script would do.


Well-Known Member

Reaction score: 85
Messages: 385

The fact that someone find it necessary to invent a new utility with a special-purpose scripting language to "solve" something that is easily handled by existing tools (cron+periodic) is laughable in itself.

Whats truly funny in that link though, is in the comments. When I read C R Bryan III's description of his reliance of cron for various everyday tasks, I laughed so hard I almost fell off the chair. (Now, why didn't I think of using cron to "announce sane bedtimes"?)