Re: Re: Dated/Timed actions

From: Date: Tue, 02 Oct 2001 14:25:20 +0000
Subject: Re: Re: Dated/Timed actions
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-69574@lists.php.net to get a copy of this message
paharito@infonegocio.com (Paharito) wrote: > Well, it maybe posibble... but how can be it done by a php script? > > I mean: > > - The job is to send a mail to the mail-list of my web every monday, but I > cannot use the crontab > > I think I can do this script: > > - At every visit at my index page, I check the system date, and if it is > equal to 0:00am of monday, send the mail, and maybe, set a variable = 1 (1 > means Send, for example), so the next visit won't active the script that > sends the email... > > But if there are 2 simultaneos visits at 0:00am or mayor, the php will > execute 2 times the script... > > so... is there a good script as efective as a cron job? > cron is the superior when you need to do things like that. It's not effective to have a script running all the time checking for jobs. -- Henrik Hansen

« previous php.general (#69574) next »