Re: Automatically changing data in database
| From: | Kenneth Bogucki | Date: | Thu, 24 Aug 2000 14:38:25 +0000 |
| Subject: | Re: Automatically changing data in database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13429@lists.php.net to get a copy of this message | ||
We had a similar problem, however, I wasn't convienced that our hosting
service would run the cron job each day...
What we did was this, we used the user to change the file for us. We
used the date function to get the day of the year, 214th day 215th day
etc then created a dummy file 214.dat etc. Each time the user requested
a specific function, also relating to articles, the script would check
the day of the year and compare it to the dat file, if the numbers
match the script does this that and the other thing, if the numbers do
not match, it's after midnight, the script deletes the old dat file,
creates a new one, then makes whatever changes or fill whatever requests
etc based on the fact that it's a new day.
In short, the first user to access our site after midnight , reset all
the dat files and changed the face of a particular page.
ken
Siim Einfeldt wrote:
>
> Hi folks
>
> I
m working on an online magazine. I need the so said
> 'todays' article to
> change every day at 24.00. How could I tell the program to make the
> changes at exactly 24.00?
>
> Thank you in advance,
> Siim Einfeldt