RE: [PBML] restrict script to run once a day
- usually you use a /tmp file to do this kind of stuff:
my $key = '/tmp/.key';
my $day = 24 * 60 * 60; # 24 hrs x 60 min x 60 sec
my @stats = stat $key;
die "I'm only allowed to run once every 24 hours!\n"
unless time - $day > $stats # stats is mtime of file
open KEY, '>', $key; # touch file
From: Priss [mailto:priss_uk_2000@...]
Sent: Monday, September 30, 2002 3:15 AM
Subject: [PBML] restrict script to run once a day
What is the best way to restrict my script only allow
to run once a day? I am going to put it in my crontab
but incase someone run it manually by mistake.
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
Unsubscribing info is here:
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/