*BSD News Article 85090


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!ames!enews.sgi.com!news.sgi.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.mathworks.com!news.kei.com!news.thenet.net!uunet!in3.uu.net!138.95.18.2!wilbur.sequent.com!newsfeed.orst.edu!news.uidaho.edu!usenet
From: "Faried Nawaz" <fn@uidaho.edu>
Newsgroups: comp.unix.bsd.misc
Subject: Re: localtime - how does it work?
Date: 17 Dec 1996 02:30:45 -0800
Organization: dis.
Lines: 31
Sender: nawaz921@elk.cs.uidaho.edu
Distribution: world
Message-ID: <imiv61mpii.fsf@elk.cs.uidaho.edu>
References: <32b8149a.2202642@newnews.dial.pipex.com>
NNTP-Posting-Host: elk.cs.uidaho.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In-reply-to: geoff.cox@dial.pipex.com's message of Mon, 16 Dec 1996 09:23:09
	GMT
Cc: geoff.cox@dial.pipex.com
X-Newsreader: Gnus v5.1
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.misc:1838


[ posted, cc'd in mail ]

In article <32b8149a.2202642@newnews.dial.pipex.com> geoff.cox@dial.pipex.com (Geoff Cox) writes:


   I am trying to write a little perl code so that I can read from a file
   on a unix web server each day at say 13.00 hrs and email the contents
   to someone.......

can you do this via crontab?

man 1 crontab
man 5 crontab

you may need to get the sysadmins to set up stuff for you to use it.

   I guess again
   that I need to set a loop going which looks at the time (hours) and
   when it sees 13 it jumps out and opens the file etc and then
   overwrites the file and waits for the next 13...?

how about you start it one day at 13:00, and use 

sleep(86400); 

to have it wait for the next 13:00?  it'll be approximately correct
for some time.


use the crontab.