develooper Front page | perl.beginners | Postings from February 2002

Re: Time sensative Sub Routine

From:
Shaun Fryer
Date:
February 22, 2002 16:30
Subject:
Re: Time sensative Sub Routine
Message ID:
Pine.BSO.4.21.0202221911530.13116-100000@zeus.sorcery.ca
I did this by storing the data as an associative array within a
database. The HTML form where the person inputs their message POSTS
the data to a CGI which then inputs it into a database with the
current localtime(time) used as a unique key. The date the person
selected for delivery is also converted into Perl's localtime(time)
format as one of the associated array elements. Cron then periodically
executes another CGI which checks the database, and if the timestamp
in the array is in the past, it prints the corresponding data to
"|sendmail -t". Doing the localtime(time) conversion in reverse is a
little tedious to work out, but it functions very reliably once you
get it down.

===================
 Shaun Fryer
===================
 London Webmasters
 http://LWEB.NET
 PH:  519-858-9660
 FX:  519-858-9024
===================




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About