im writing an announcement board and i have a posted timestamp a field for
the date and time of the event (needs to be checked with cron) and a event
name and message field in the table..

i need to have the date and time of the event checked so when cron runs if
the posted event is on 2003-02-11 15:00:00 for example then at 24:00:00 that
day cron will delete that record because it isnt needed anymore.. the
variables i have are $EventDate $EventTime $Note and NULL (for timestamp)..
based on the $EventDate and $EventTime vars pulled out of the table or based
on vars created with day(EventDay) and so on how to use them with cron...

i have never used cron/crontab before ..

and just so i know what should i search for on google...since none of my
searches for anything about cron/crontab come back with anything on the list
archive..

tnx


----- Original Message -----
From: "Steve Werby" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 5:12 PM
Subject: Re: [PHP] automatically delete records from a table


> "Sunfire" <[EMAIL PROTECTED]> wrote:
> > was wondering about how you could run a script that automatically ran at
> > midnight every day and deleted records that matched a certain date
stored
> in
> > a mysql table? any ideas how that supposed to work?..
> >
> > i think the script has to be a chron task on linux but im not really
sure
> > how to go about doing such a job..
>
> man cron and man crontab.  If PHP is compiled as a CGI or CLI then you can
> call the script directly, otherwise call it via the web using lyxn or
wget.
> I'd opt for CGI or CLI if at all possible so that you don't need to send a
> request to the web server.  I figure you know how to write the script and
> that it's just a matter of scheduling it.  If not please be specific about
> the problem.  This is asked pretty frequentl on php-general so between the
> archives and Google you should find what you're looking for quickly.
>
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to