Re: [SLE] Pullin' my hair out... arrrgh
From: Danny Sauer (suse-linux-e.suselists_at_danny.teleologic.net)
Date: 08/04/04
- Previous message: Dennis J. Tuchler: "Re: [SLE] need a command"
- In reply to: Anders Johansson: "Re: [SLE] Pullin' my hair out... arrrgh"
- Next in thread: Randall R Schulz: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: Randall R Schulz: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 4 Aug 2004 13:15:57 -0500 To: SuSE List <suse-linux-e@suse.com>
Anders wrote regarding 'Re: [SLE] Pullin' my hair out... arrrgh' on Wed, Aug 04 at 12:50:
> On Wednesday 04 August 2004 19:22, C Hamel wrote:
> > I need a script to execute every 18 hours w/o having to change the crontab
> > daily, if possible. I have tried sleeping/recalling script but, of course,
> > one has to then kill a bunch of pids for older executions of the same
> > script ...but at least not daily, I don't suppose.
> >
> > Is there a cleaner way of doing this?
>
> finish the script with something like
>
> cat << EOF |at now + 18 hours
> /usr/bin/scriptname
> EOF
I'm partial to
echo $0 | at now + 18 hours
since it continues to work even if the script gets moved/renamed and I forget
to change self references inside the script. Data duplication is bad. ;)
This is assuming the use of a shell that puts the command in $0, obviously.
It might be a good idea to touch a file (/var/state/scriptname, perhaps)
to ensure that the script's running periodically, and have a cron job that
sends a warning email if that file's older than 18 hours or so...
--Danny, who also dislikes here documents, in general
-- 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: Dennis J. Tuchler: "Re: [SLE] need a command"
- In reply to: Anders Johansson: "Re: [SLE] Pullin' my hair out... arrrgh"
- Next in thread: Randall R Schulz: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: Randall R Schulz: "Re: [SLE] Pullin' my hair out... arrrgh"
- Reply: C Hamel: "Re: [SLE] Pullin' my hair out... arrrgh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|