Re: [SLE] Pullin' my hair out... arrrgh
From: Carlos E. R. (robin1.listas_at_tiscali.es)
Date: 08/05/04
- Previous message: burgeke_at_HQ.VerizonWireless.com: "[SLE] ipw2100 & suspend/standby"
- In reply to: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Next in thread: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: Misty Stanley-Jones: "Re: [SLE] Pullin' my hair out... arrrgh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 5 Aug 2004 12:34:16 +0200 (CEST) To: SLE <suse-linux-e@suse.com>
The Wednesday 2004-08-04 at 20:29 -0500, C Hamel wrote:
> On Wednesday 04 August 2004 14:00, Misty Stanley-Jones wrote:
> > Every 18 hours huh? 18 is a multiple of 6. 6*3 is 18, 6*4 is 24. Every
> > 18 hours would be 6, 24, 18, 12. Run the cron job at all of these times,
> > have it check for a file /tmp/should_run that gets generated when the
> > script should run.
> >
> Not sure that I follow you. Would you mind elaborating? (Have you heard the
> story of the donkey that needed a 2x4 in the head to get its attention so it
> would plow?)
Simple enough. Suppose you start at 00 hours. The next time, 18 hours
later, would be at 18:00. The next time at 12:00 of the next day... you
have an arithmetic series:
day hour lapse
---+--------+------
0 00:00 00
0 18:00 18
1 12:00 36
2 6:00 54
2 24:00 72
So you get a three days cycle. How to put that into crontab: "I'll leave
that as an exercise for the reader", translated as "I feel lazy" :-p
[...]
Alternatively, what the original poster said, is to have the script run
every day at hours 00, 6, 12, 18 and 24 (00), but check at the start when
was the last time it run, calculating the time diference.
Ie, the first time it would run at 00:00 hours, and would save a flag file
somewhere stating that fact. The next cron job would start at 06:00, read
the flag file, notice the time lapse not being 18 hours, ant exit. Same
thing at noon, but at 6 PM the time lapse would be correct, it would run,
and then, modify the flag file.
Right? :-)
--
Cheers,
Carlos Robinson
--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: burgeke_at_HQ.VerizonWireless.com: "[SLE] ipw2100 & suspend/standby"
- In reply to: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Next in thread: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: Misty Stanley-Jones: "Re: [SLE] Pullin' my hair out... arrrgh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|