On Tuesday, May 21, 2002, at 10:01 , Troy May wrote: [..] > His server is running RedHat 6.1 Cartman. [..] with little more than a quick peek at redhat.com - this seems to be their old 6.1 release - so yes cron should be ok.
cf: man 5 crontab > He needs to have a data file erased the first time it is wrote to every > day. > But the rest of the day it will just append to it as normal. I thought of > cron right away, but now I'm stuck since he can't go that route. Any > ideas? part of the problem here is that 'cgi' code is 'stateless' in the sense that any given invocation is not carrying the same state as any other invocation - nor does the code itself carry around such state information. So my presumption is that this is something for a piece of 'cgi code'..... one trick you might want to think about is the old myFile-<dtg>.<suffix> embedding the dtg { date time group } in the file name means that "today's processes" start writing to tomorrows files after midnight and the cronjob will be able to deal with yesterday's files today..... { hence put the cronjob around 0300 - since any process that is still hung out for 3 hours needs to be whacked anyway... } this avoids the need for interlocking between your cgi code and your cronjob. Or open them up in the older pattern /myBaseDir/YYYY/MM/foo.DD.suffix { note that this format will break with the y10K bug, but that means that in the year 9999 you will most likely get hired back to maintain it. So make sure to write very maintainable code - as you may forget some of it by then. } ciao drieux --- ps: rather than have to worry about how to do the time thing may I recommend to you the piece I stole from Ovid: # # you gotta give ovid points for sheer weirdness # never retype what you can cut and paste - may complements. # never argue with what works. PERIOD. my @t=localtime;$t[4]++;$t[5]+=1900; my $dtg = sprintf("%4d-%02d-%02d",@t[5,4,3]); cf: http://www.wetware.com/drieux/pbl/Sys/Admin/parsingFileFromOneToAnother.txt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]