Re: crontab same time execution order

From: Dave McCammon (davemac11_at_yahoo.com)
Date: 07/05/03

  • Next message: rcooley: "MPlayer bsdbt848 TV-in problem on 4.7"
    Date: Fri, 4 Jul 2003 22:43:37 -0700 (PDT)
    To: Chuck Swiger <cswiger@mac.com>
    
    

    --- Chuck Swiger <cswiger@mac.com> wrote:
    > Dave McCammon wrote:
    > > If two entries in the crontab are for the same
    > time,
    > > which entry gets ran first?
    >
    > It's not deterministic, or if it happens to be so
    > under FreeBSD, it's not on
    > other platforms and you should not rely on a
    > particular order.
    >
    > If you've got commands which depend on each other in
    > cron, do something like:
    >
    > command1 ; command2 ; command3
    >
    > ...or...
    >
    > command1 && command2 && command3
    >

    Thanks for the reply.
    Basically, what I am looking for is to get a command
    to run right before newsyslog rotates a log
    file(awstats and apache log file.
     
    After I sent the message, I started playing with
    /etc/crontab and noticed that the lower on the list
    the sooner the command would run (per /var/log/cron)
    in comparison with a command set to run at the same
    time.
    What I did was put an 'echo' command above the
    newsyslog entry, restarted cron,waited for top of
    hour, checked log, moved command below the newsyslog
    entry, restarted cron, waited for top of hour and
    checked log file.
    The command ran before cron when listed lower and then
    ran after when command was listed above the newsyslog
    entry. I also noticed that when the 'atrun' command
    runs at the top of the hour, it will run after the
    newsyslog entry and newsyslog is listed lower in the
    /etc/crontab file.

    Perhaps this predictable behavior is in FreeBSD only.
    (I don't have access to other platforms). Or perhaps
    my simple test was too simple. It just seemed to be
    too predictable to not at least try to get some feed
    back.

    __________________________________
    Do you Yahoo!?
    SBC Yahoo! DSL - Now only $29.95 per month!
    http://sbc.yahoo.com
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: rcooley: "MPlayer bsdbt848 TV-in problem on 4.7"

    Relevant Pages

    • Re: lessecho missing?
      ... Name of the lessecho program. ... then try the ave command to save a copy to a designated file. ... # - Third entry is the one the editor will print with "set" command. ... log file: /tmp/checkoutless ...
      (comp.unix.sco.misc)
    • Re: How to have a shell script write a log file with a function
      ... actually started from another shell script with the "ksh -x" command ... and then I just write the output to a log file. ... entry and then I could just call the function and hand it a parameter ...
      (comp.unix.shell)
    • Re: ie6sp1 : Repair Function Blocked - Anyone know of a fix?
      ... Robert Aldwinckle wrote: ... >> Unfortunately am having a bit of difficulty with GetVers. ... > for command itself not to the thing it is being used to execute. ... Ran Registry Find - one entry: ...
      (microsoft.public.windows.inetexplorer.ie6.browser)
    • Re: ie6sp1 : Repair Function Blocked - Anyone know of a fix?
      ... I already explained that that command cannot ... work because there is no DllRegisterServer entry point in that module. ... there is a DllInstall entry point there. ... NTx uses the registry value. ...
      (microsoft.public.windows.inetexplorer.ie6.browser)
    • Re: Messages at form closing?
      ... the user's entry. ... > Save command buttong, so I coded my own that updates to the degree I ... One one of the subforms is a command ... >>> Change the data in the field or fields that contain the duplicate data, ...
      (microsoft.public.access.modulesdaovba)