in reply to Time-Based Conditionals?

You could set up a cron job to run the script on the given day.

Or if you do not mind having a perlscript always running, you can use select() to pause the script, then check to see what day it is.

select( undef,undef,undef,86400);

would pause for 1 day (60 * 60 * 24)s in a day.

Date::Calc is good for calandar manipulations.

Replies are listed 'Best First'.
Re^2: Time-Based Conditionals?
by Spidy (Chaplain) on Aug 27, 2004 at 17:41 UTC
    This is assuming that I'm using CGI, and printing out some html. I'm trying to figure out a way to have it print out code on a certain day, for example October 12th. How would I first check to see what day/time it was, and then do something based on the code? I'm fairly certain that doing something would just be a simply matter of putting something inside the conditional, but..?

      See localtime() or gmtime(). You could compare the results of the returned array to some parameters.

      --MidLifeXis

        After asking around, I have found that localtime() will suit my methods perfectly. Thanks for the help though.

        Spidy