[Cialug] Cron
Brett Neese
brneese at brneese.com
Fri Mar 25 11:58:52 CDT 2016
You can also put scripts in /etc/cron.hourly (or daily, weekly, etc) and
prefix them with numbers to change the execution order. Not sure if they
block each other, though? (IE if you have one script that relies on the
execution of another script you'd want the first script to finish first,
not simply fired in different threads one by one.)
https://help.ubuntu.com/community/CronHowto#Further_Considerations
Brett Neese
563-210-3459
On Thu, Mar 24, 2016 at 9:50 PM, Jim Cole <jrcole at gmail.com> wrote:
>
> http://askubuntu.com/questions/143666/in-what-order-do-cron-jobs-with-the-same-schedule-run
>
> That makes it sound like its top down for Debian, Ubuntu but can vary per
> distro with freebsd being bottom up.
> On Mar 24, 2016 10:44 PM, "Sean Flattery" <sean.r.flattery at gmail.com>
> wrote:
>
> > Perhaps I'm reading the output of ls wrong, but it seems like files were
> > written in reverse order.
> >
> > 16:40:06.350406655 -0500 /tmp/first.txt
> > 16:40:06.340406654 -0500 /tmp/third.txt
> > 16:40:06.335406654 -0500 /tmp/second.txt
> > 16:40:06.327406653 -0500 /tmp/fourth.txt
> > 16:40:06.304406652 -0500 /tmp/fifth.txt
> >
> > Running "ls -lt --full-time /tmp/*.txt | sort -k7" should sort it
> properly.
> >
> >
> >
> >
> > > Date: Wed, 23 Mar 2016 17:09:44 -0500
> > > From: David Champion <dchamp1337 at gmail.com>
> > > To: Central Iowa Linux Users Group <cialug at cialug.org>
> > > Subject: Re: [Cialug] Cron
> > > Message-ID:
> > > <CAJ7QWVOy5sLy02QgLxiJErjg=
> > > xdiADcjbPvC353od0p47asT-A at mail.gmail.com>
> > > Content-Type: text/plain; charset=UTF-8
> > >
> > > Also illustrates that you can't count on the order things will execute
> in
> > > this manner, since second.txt and third.txt are out of order. But,
> close
> > > enough.
> > >
> > > -dc
> > >
> > > On Wed, Mar 23, 2016 at 4:46 PM, kristau <kristau at gmail.com> wrote:
> > >
> > > > Interesting results:
> > > >
> > > > 40 16 * * * echo "FIRST" > /tmp/first.txt
> > > > 40 16 * * * echo "SECOND" > /tmp/second.txt
> > > > 40 16 * * * echo "THIRD" > /tmp/third.txt
> > > > 40 16 * * * echo "FOURTH" > /tmp/fourth.txt
> > > > 40 16 * * * echo "FIFTH" > /tmp/fifth.txt
> > > >
> > > > ls -lt --full-time /tmp/*.txt
> > > > -rw-r--r--. 1 kristau kristau 6 2016-03-23 16:40:06.350406655 -0500
> > > > /tmp/first.txt
> > > > -rw-r--r--. 1 kristau kristau 6 2016-03-23 16:40:06.340406654 -0500
> > > > /tmp/third.txt
> > > > -rw-r--r--. 1 kristau kristau 7 2016-03-23 16:40:06.335406654 -0500
> > > > /tmp/second.txt
> > > > -rw-r--r--. 1 kristau kristau 7 2016-03-23 16:40:06.327406653 -0500
> > > > /tmp/fourth.txt
> > > > -rw-r--r--. 1 kristau kristau 6 2016-03-23 16:40:06.304406652 -0500
> > > > /tmp/fifth.txt
> > > >
> > > >
> > > > I'd say, "Simultaneous enough?"
> > > >
> > >
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> >
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
More information about the Cialug
mailing list