Re: Please help me as fast as possible.. very important!!

From: Date: Tue, 20 Jan 2004 11:10:08 +0000
Subject: Re: Please help me as fast as possible.. very important!!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-175120@lists.php.net to get a copy of this message
The only thing you need to know is that you enter a file in the cron dir (in /etc I think) and you have the following line in that file: 52 10 * * * /usr/bin/php /home/mainwebsite_html/file.php this line runs the file.php every day at 10.52 (min hour week month year) (php dir) (file location) - the star means any day-month-year [i'm not sure if it's week month year or year month week] If there is a cron.daily or monthly ...etc... you don't need to specify the first part (date time stuff) e.g. /usr/bin/php /home/mainwebsite_html/file.php ----- Original Message ----- From: "Radwan Aladdin" <raladin@emirates.net.ae> To: "Nick JORDAN" <nick.jordan@danone.com> Cc: <php-general@lists.php.net> Sent: Tuesday, January 20, 2004 12:05 PM Subject: Re: [PHP] Please help me as fast as possible.. very important!! > Where can I fin tutorials about it? (CRON Tab)? > > Regards.. > ----- Original Message ----- > From: "Nick JORDAN" <nick.jordan@danone.com> > To: "Radwan Aladdin <raladin" <raladin@emirates.net.ae> > Sent: Tuesday, January 20, 2004 1:56 PM > Subject: Re: [PHP] Please help me as fast as possible.. very important!! > > > > > Is it possible in mySQL to put a timer that changes a value inside a > > > row in a table every while? > > > > > For example : Add "1" to the value very 10 minutes for example.. > > > Field number = 5 after ten minutes = 6 after another 10 minuste = > > 7..Etc.. > > > > > > As far as I'm aware, that's not possible in MySQL, however you could write > > a small script in PHP (or, indeed, some other language) which would > > increment the counter, and which would be run at intervals via cron (for > > instance). > > > > A better solution, however, would be to include a timestamp in your > > database, then, when data is requested, calculate how many units of ten > > minutes have passed and adjust your counter accordingly. > > > > Nick > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#175120) next »