Re: Deleting all rows in a database every 24 hours?

From: Date: Fri, 22 Feb 2008 14:58:58 +0000
Subject: Re: Deleting all rows in a database every 24 hours?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269859@lists.php.net to get a copy of this message
On Fri, Feb 22, 2008 at 1:28 AM, Zoran Bogdanov <test1.test1@hi.t-com.hr> wrote: > The title says it all, how do I perform an action every 24 hours? Another question better answered on Google. PHP Script: <? $sql = "TRUNCATE TABLE tablename"; mysql_query($sql); ?> Crontab Entry: 40 3 * * * which php /path/to/your/script.php That will run every morning at 3:40a server time with the path-preferred PHP. If you're on Windows, look up Scheduled Tasks. -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?>

« previous php.general (#269859) next »