[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Possible RubyQuiz idea

Hal E. Fulton

4/4/2006 1:47:00 AM

This might be too easy, it's JEG2's call.

Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.

Just a thought.


Cheers,
Hal



11 Answers

Austin Ziegler

4/4/2006 4:05:00 AM

0

On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:> This might be too easy, it's JEG2's call.>> Read in an ordinary crontab file and print out a list of> jobs that will run in the next N minutes.Fairly easy, but with some interesting edge cases (t + N crossing anhour, day, month, or year boundary; dealing with leap years; dealingwith summer time/winter time switches).-austin--Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca

Ara.T.Howard

4/4/2006 4:10:00 AM

0

Robert Dober

4/4/2006 11:30:00 AM

0

On 4/4/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
>
> On Tue, 4 Apr 2006, Austin Ziegler wrote:
>
> > On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
> >> This might be too easy, it's JEG2's call.
> >>
> >> Read in an ordinary crontab file and print out a list of
> >> jobs that will run in the next N minutes.
> >
> > Fairly easy, but with some interesting edge cases (t + N crossing an
> > hour, day, month, or year boundary; dealing with leap years; dealing
> > with summer time/winter time switches).
>
> not to mention cron supports variables, ranges, wildcards, and lists!
>
>
> -a
> --
> share your knowledge. it's a way to achieve immortality.
> - h.h. the 14th dali lama
>
>
Rewriting cron in ruby

--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.

- Albert Einstein

James Gray

4/4/2006 1:36:00 PM

0

On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:

> Rewriting cron in ruby

Call me crazy, but that one sounds like fun to me. :D

James Edward Gray II


azrael

4/4/2006 1:49:00 PM

0

On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
>
> >Rewriting cron in ruby
>
> Call me crazy, but that one sounds like fun to me. :D

You should aim high, and think "bigger than cron".

Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of services, signal handling, session-handling and automatic dependency discovery. *Then* you're talking.

Cron? Tchoh.

Martin


Zed A. Shaw

4/4/2006 2:03:00 PM

0




On 4/4/06 9:48 AM, "azrael@cream.org" <azrael@cream.org> wrote:

> On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
>> On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
>>
>>> Rewriting cron in ruby
>>
>> Call me crazy, but that one sounds like fun to me. :D
>
> You should aim high, and think "bigger than cron".
>
> Create one convention-over-configuration Ruby program with Needles that
> can replace crond, atd, init, supervise, inetd and anything else that
> starts a program ever; make it supports port-proxying, lazy loading of
> services, signal handling, session-handling and automatic dependency
> discovery. *Then* you're talking.
>
> Cron? Tchoh.
>

Then watch as people gleefully hack into the newly started
RubyCronolithOfTheGods.

Could be fun though.

Zed A. Shaw
http://www.ze...
http://mongrel.ruby...



pat eyler

4/4/2006 2:25:00 PM

0

On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
> On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> > On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
> >
> > >Rewriting cron in ruby
> >
> > Call me crazy, but that one sounds like fun to me. :D
>
> You should aim high, and think "bigger than cron".
>
> Create one convention-over-configuration Ruby program with Needles that
> can replace crond, atd, init, supervise, inetd and anything else that
> starts a program ever; make it supports port-proxying, lazy loading of services,
> signal handling, session-handling and automatic dependency discovery.
> *Then* you're talking.

Spend some time looking at CFEngine and CFRuby/libcf if you choose to
go down this path.

>
> Cron? Tchoh.
>
> Martin
>
>


--
thanks,
-pate
-------------------------


azrael

4/4/2006 2:44:00 PM

0

On Tue, Apr 04, 2006 at 11:25:06PM +0900, pat eyler wrote:
> On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
> > On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> > > On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
> > >
> > > >Rewriting cron in ruby
> > >
> > > Call me crazy, but that one sounds like fun to me. :D
> >
> > You should aim high, and think "bigger than cron".
> >
> > Create one convention-over-configuration Ruby program with Needles that
> > can replace crond, atd, init, supervise, inetd and anything else that
> > starts a program ever; make it supports port-proxying, lazy loading of services,
> > signal handling, session-handling and automatic dependency discovery.
> > *Then* you're talking.
>
> Spend some time looking at CFEngine and CFRuby/libcf if you choose to
> go down this path.

Ooh, this looks interesting.

Martin


Robert Dober

4/4/2006 2:58:00 PM

0

On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
>
> On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> > On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
> >
> > >Rewriting cron in ruby
> >
> > Call me crazy, but that one sounds like fun to me. :D
>
> You should aim high, and think "bigger than cron".
>
> Create one convention-over-configuration Ruby program with Needles that
> can replace crond, atd, init, supervise, inetd and anything else that
> starts a program ever; make it supports port-proxying, lazy loading of
> services, signal handling, session-handling and automatic dependency
> discovery. *Then* you're talking.
>
> Cron? Tchoh.
>
> Martin
>
>
Do not touch!!! This belongs to Hurd ;)

--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.

- Albert Einstein

Hal E. Fulton

4/5/2006 3:57:00 AM

0

ara.t.howard@noaa.gov wrote:
> On Tue, 4 Apr 2006, Austin Ziegler wrote:
>
>> On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
>>
>>> This might be too easy, it's JEG2's call.
>>>
>>> Read in an ordinary crontab file and print out a list of
>>> jobs that will run in the next N minutes.
>>
>>
>> Fairly easy, but with some interesting edge cases (t + N crossing an
>> hour, day, month, or year boundary; dealing with leap years; dealing
>> with summer time/winter time switches).
>
>
> not to mention cron supports variables, ranges, wildcards, and lists!

Yes, it's ranges, wildcards, and lists that make it interesting
to me, not the edge cases. As for variables, I'm not sure what
you mean.

One reason I mention this idea is that I have had a practical need
for it on several occasions and have never got around to writing
such a tool.


Hal