Possible RubyQuiz idea

Discussion in 'Ruby' started by Hal Fulton, Apr 4, 2006.

  1. Hal Fulton

    Hal Fulton Guest

    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
     
    Hal Fulton, Apr 4, 2006
    #1
    1. Advertising

  2. T24gNC8zLzA2LCBIYWwgRnVsdG9uIDxoYWw5MDAwQGh5cGVybWV0cmljcy5jb20+IHdyb3RlOgo+
    IFRoaXMgbWlnaHQgYmUgdG9vIGVhc3ksIGl0J3MgSkVHMidzIGNhbGwuCj4KPiBSZWFkIGluIGFu
    IG9yZGluYXJ5IGNyb250YWIgZmlsZSBhbmQgcHJpbnQgb3V0IGEgbGlzdCBvZgo+IGpvYnMgdGhh
    dCB3aWxsIHJ1biBpbiB0aGUgbmV4dCBOIG1pbnV0ZXMuCgpGYWlybHkgZWFzeSwgYnV0IHdpdGgg
    c29tZSBpbnRlcmVzdGluZyBlZGdlIGNhc2VzICh0ICsgTiBjcm9zc2luZyBhbgpob3VyLCBkYXks
    IG1vbnRoLCBvciB5ZWFyIGJvdW5kYXJ5OyBkZWFsaW5nIHdpdGggbGVhcCB5ZWFyczsgZGVhbGlu
    Zwp3aXRoIHN1bW1lciB0aW1lL3dpbnRlciB0aW1lIHN3aXRjaGVzKS4KCi1hdXN0aW4KLS0KQXVz
    dGluIFppZWdsZXIgKiBoYWxvc3RhdHVlQGdtYWlsLmNvbQogICAgICAgICAgICAgICAqIEFsdGVy
    bmF0ZTogYXVzdGluQGhhbG9zdGF0dWUuY2EK
     
    Austin Ziegler, Apr 4, 2006
    #2
    1. Advertising

  3. Hal Fulton

    Guest

    On Tue, 4 Apr 2006, Austin Ziegler wrote:

    > On 4/3/06, Hal Fulton <> 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
     
    , Apr 4, 2006
    #3
  4. Hal Fulton

    Robert Dober Guest

    ------=_Part_13151_3969584.1144150202591
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On 4/4/06, <> wrote:
    >
    > On Tue, 4 Apr 2006, Austin Ziegler wrote:
    >
    > > On 4/3/06, Hal Fulton <> 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=EAtise humaine ; en ce qui
    concerne l'univers, je n'en ai pas acquis la certitude absolue.

    - Albert Einstein

    ------=_Part_13151_3969584.1144150202591--
     
    Robert Dober, Apr 4, 2006
    #4
  5. 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
     
    James Edward Gray II, Apr 4, 2006
    #5
  6. Hal Fulton

    Guest

    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
     
    , Apr 4, 2006
    #6
  7. Hal Fulton

    Zed Shaw Guest

    On 4/4/06 9:48 AM, "" <> 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.zedshaw.com/
    http://mongrel.rubyforge.org/
     
    Zed Shaw, Apr 4, 2006
    #7
  8. Hal Fulton

    pat eyler Guest

    On 4/4/06, <> 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 se=

    rvices,
    > 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
    -------------------------
     
    pat eyler, Apr 4, 2006
    #8
  9. Hal Fulton

    Guest

    On Tue, Apr 04, 2006 at 11:25:06PM +0900, pat eyler wrote:
    > On 4/4/06, <> 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
     
    , Apr 4, 2006
    #9
  10. Hal Fulton

    Robert Dober Guest

    ------=_Part_15835_6827943.1144162672743
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    On 4/4/06, <> 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=EAtise humaine ; en ce qui
    concerne l'univers, je n'en ai pas acquis la certitude absolue.

    - Albert Einstein

    ------=_Part_15835_6827943.1144162672743--
     
    Robert Dober, Apr 4, 2006
    #10
  11. Hal Fulton

    Hal Fulton Guest

    wrote:
    > On Tue, 4 Apr 2006, Austin Ziegler wrote:
    >
    >> On 4/3/06, Hal Fulton <> 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
     
    Hal Fulton, Apr 5, 2006
    #11
  12. --Apple-Mail-24-555971664
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain;
    charset=US-ASCII;
    delsp=yes;
    format=flowed


    On Apr 4, 2006, at 9:48 AM, wrote:

    >> 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
    >


    too bad launchd isn't written in ruby
    --Apple-Mail-24-555971664--
     
    Logan Capaldo, Apr 5, 2006
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    10
    Views:
    1,243
    Big K
    Feb 2, 2005
  2. femto gary
    Replies:
    1
    Views:
    130
    femto gary
    Sep 8, 2006
  3. Ian Evans

    Rubyquiz: Making Change (#154)

    Ian Evans, Jan 30, 2008, in forum: Ruby
    Replies:
    0
    Views:
    98
    Ian Evans
    Jan 30, 2008
  4. Matthew Moss

    Next rubyquiz coming this evening

    Matthew Moss, Feb 29, 2008, in forum: Ruby
    Replies:
    0
    Views:
    79
    Matthew Moss
    Feb 29, 2008
  5. Matthew Moss

    rubyquiz summary late

    Matthew Moss, Sep 12, 2008, in forum: Ruby
    Replies:
    0
    Views:
    82
    Matthew Moss
    Sep 12, 2008
Loading...

Share This Page