whenjobs - What the?

jrm@

Daemon
Developer

Reaction score: 471
Messages: 1,200

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.
Awesome!

I wonder if this will be as successful as HAL?
 

anomie

Aspiring Daemon

Reaction score: 119
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.
 

tingo

Daemon

Reaction score: 365
Messages: 1,939

graudeejs said:
https://www.linux.com/learn/tutorials/552976-weekend-project-take-a-look-at-cron-replacement-whenjobs

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.
 

_martin

Aspiring Daemon

Reaction score: 156
Messages: 766

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.
 

jalla

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"?)
 
Top