cron bug? - SCO

This is a discussion on cron bug? - SCO ; Am I missing something, or is this a bug in cron? OSR5.0.6 COMMAND can be whatever. # grep COMMAND /usr/spool/cron/crontabs ../root:18 13 23 01 1,2,3,4,5 exec COMMAND ^^^^^^^^^--- over-rides Jan 23 13:18 ../root:18 13 23 01 * exec COMMAND ^^^^^^^^^--- ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: cron bug?

  1. cron bug?

    Am I missing something, or is this a bug in cron?
    OSR5.0.6

    COMMAND can be whatever.
    # grep COMMAND /usr/spool/cron/crontabs

    ../root:18 13 23 01 1,2,3,4,5 exec COMMAND
    ^^^^^^^^^--- over-rides Jan 23 13:18
    ../root:18 13 23 01 * exec COMMAND
    ^^^^^^^^^--- Works as expected, does NOT run
    except Jan 23, 13:18

    Any ideas?
    Jeff H

  2. Re: cron bug?

    Jeff Hyman typed (on Wed, Jan 30, 2008 at 01:23:05PM -0500):
    | Am I missing something, or is this a bug in cron?
    | OSR5.0.6
    |
    | COMMAND can be whatever.
    | # grep COMMAND /usr/spool/cron/crontabs

    Don't be typing "/usr/spool./cron" as part of any command, it's living on
    the edge. You could do:

    crontab -l | grep pattern


    | ./root:18 13 23 01 1,2,3,4,5 exec COMMAND
    | ^^^^^^^^^--- over-rides Jan 23 13:18

    No "over-riding:" is occuring. Read the crontab man page. The
    command will run every Mon Tue Wed Thu Fri, AND ALSO Saturday or
    Sunday providing the date is Jan 23.

    that day
    | ./root:18 13 23 01 * exec COMMAND
    | ^^^^^^^^^--- Works as expected, does NOT run
    | except Jan 23, 13:18

    What's the purpose of the "exec" ?

    --
    JP

  3. Re: cron bug?

    Jean-Pierre Radley typed (on Wed, Jan 30, 2008 at 03:31:56PM -0500):
    | Jeff Hyman typed (on Wed, Jan 30, 2008 at 01:23:05PM -0500):
    | | Am I missing something, or is this a bug in cron?
    | | OSR5.0.6
    | |
    | | COMMAND can be whatever.
    | | # grep COMMAND /usr/spool/cron/crontabs
    |
    | Don't be typing "/usr/spool./cron" as part of any command, it's living on
    | the edge. You could do:
    |
    | crontab -l | grep pattern
    |
    | | ./root:18 13 23 01 1,2,3,4,5 exec COMMAND
    | | ^^^^^^^^^--- over-rides Jan 23 13:18
    |
    | No "over-riding:" is occuring. Read the crontab man page. The
    | command will run every Mon Tue Wed Thu Fri, AND ALSO Saturday or
    | Sunday providing the date is Jan 23.
    ^^^^^^^ I AGREE
    |
    | that day
    | | ./root:18 13 23 01 * exec COMMAND
    | | ^^^^^^^^^--- Works as expected, does NOT run
    | | except Jan 23, 13:18
    |
    | What's the purpose of the "exec" ?
    |
    | --
    | JP

    JP, for a second, lets forget about the 'exec' and how I 'restarted' cron.
    Though good feedback, it has nothing to do with this error/bug.
    I've tested this here and the problem exists, and makes no sence.
    Even with my approach, I'm not new to cron :-) and yes, I did a man cron

    What I'm telling you is today is Jan 30 and yesterday was Jan 29... and so on.
    The command, as shown, should ONLY execute on Jan 23rd. Right??? Right.
    The *ONLY* difference is how the days-of-week are entered in roots crontab file.

    18 13 23 01 1,2,3,4,5 COMMAND <-- Fails (Runs EVERY Mon-Fri)
    18 13 23 01 * COMMAND <-- Success (Only runs Jan 23)

    With this said, please recorrect me... as I don't think I'm going
    insane (yet).

    PS: I appreciate the feedback!
    - Jeff H


  4. Re: cron bug?

    Not completely understanding man cron,
    I now understand:

    Your command will run if it is Jan 23rd **OR** if it is M-T-W-T-F.

    Correct?
    Then why would the "*" (which represents ALL the days of the week)
    not reproduce the same results?
    - Jeff H

  5. Re: cron bug?

    Jeff Hyman typed (on Wed, Jan 30, 2008 at 04:24:45PM -0500):
    | Not completely understanding man cron,
    | I now understand:
    |
    | Your command will run if it is Jan 23rd **OR** if it is M-T-W-T-F.
    |
    | Correct?
    | Then why would the "*" (which represents ALL the days of the week)
    | not reproduce the same results?

    Again see the man page:

    To specify days by only one field, the other field should be set
    to `` * '' (for example, 0 0 * * 1 would run a command only on
    Mondays).


    --
    JP

  6. Re: cron bug?

    Jean-Pierre Radley typed (on Wed, Jan 30, 2008 at 04:39:31PM -0500):
    | Jeff Hyman typed (on Wed, Jan 30, 2008 at 04:24:45PM -0500):
    | | Not completely understanding man cron,
    | | I now understand:
    | |
    | | Your command will run if it is Jan 23rd **OR** if it is M-T-W-T-F.
    | |
    | | Correct?
    | | Then why would the "*" (which represents ALL the days of the week)
    | | not reproduce the same results?
    |
    | Again see the man page:
    |
    | To specify days by only one field, the other field should be set
    | to `` * '' (for example, 0 0 * * 1 would run a command only on
    | Mondays).
    | JP

    Your 'man' explaination certainly makes it easier to comprehend.
    I should have thought of doing 'man crontabs' instead of 'man cron'.

    TIA,
    - Jeff H

  7. Re: cron bug?

    On Jan 30, 10:23 am, Jeff Hyman wrote:
    > Am I missing something, or is this a bug in cron?
    > OSR5.0.6
    >
    > COMMAND can be whatever.
    > # grep COMMAND /usr/spool/cron/crontabs
    >
    > ./root:18 13 23 01 1,2,3,4,5 exec COMMAND
    > ^^^^^^^^^--- over-rides Jan 23 13:18
    > ./root:18 13 23 01 * exec COMMAND
    > ^^^^^^^^^--- Works as expected, does NOT run
    > except Jan 23, 13:18
    >
    > Any ideas?
    > Jeff H


    Yes it's a bug. Apply patch oss642a.

    --Ray Robert

  8. Re: cron bug?

    ThreeStar typed (on Wed, Jan 30, 2008 at 05:45:14PM -0800):
    | On Jan 30, 10:23 am, Jeff Hyman wrote:
    | > Am I missing something, or is this a bug in cron?
    | > OSR5.0.6
    | >
    | > COMMAND can be whatever.
    | > # grep COMMAND /usr/spool/cron/crontabs
    | >
    | > ./root:18 13 23 01 1,2,3,4,5 exec COMMAND
    | > ^^^^^^^^^--- over-rides Jan 23 13:18
    | > ./root:18 13 23 01 * exec COMMAND
    | > ^^^^^^^^^--- Works as expected, does NOT run
    | > except Jan 23, 13:18
    | >
    | > Any ideas?
    | > Jeff H
    |
    | Yes it's a bug. Apply patch oss642a.
    |
    | --Ray Robert

    Ray,
    It's nice to know that at least I didn't look completely crazy,
    but JP did post a clear explaination to my concern. Is there
    a clear explaination that addresses this specific cron issue in oss646a?

    Again... thanks,
    - Jeff H

  9. Re: cron bug?

    ThreeStar typed (on Wed, Jan 30, 2008 at 05:45:14PM -0800):
    | On Jan 30, 10:23 am, Jeff Hyman wrote:
    | > Am I missing something, or is this a bug in cron?
    | > OSR5.0.6
    | >
    | > COMMAND can be whatever.
    | > # grep COMMAND /usr/spool/cron/crontabs
    | >
    | > ./root:18 13 23 01 1,2,3,4,5 exec COMMAND
    | > ^^^^^^^^^--- over-rides Jan 23 13:18
    | > ./root:18 13 23 01 * exec COMMAND
    | > ^^^^^^^^^--- Works as expected, does NOT run
    | > except Jan 23, 13:18
    | >
    | > Any ideas?
    | > Jeff H
    |
    | Yes it's a bug. Apply patch oss642a.
    |
    | --Ray Robert

    What is the bug, and what leads you to claim that oss642a "fixed" it?


    --
    JP

+ Reply to Thread