Jump to content

php batch trigger


andibakker

Recommended Posts

I have a mysql database with fields raceflag, racedatetime and cutoffhours.  I need a job to run and update the raceflag to "closed"  when the systemtime is = racedatetime - cutoffhours.  something like this

UPDATE race 
SET raceflag = 'closed'  
WHERE now() >= DATE_SUB(racedatetime, INTERVAL cutoffhour hour)");  

 

What is the best way to do this ?

Schedule a job to run every minute and check the current time ?  Is there another way ?

Thanks

Andi

Link to comment
https://forums.phpfreaks.com/topic/167929-php-batch-trigger/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.