andibakker Posted July 29, 2009 Share Posted July 29, 2009 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 More sharing options...
trq Posted July 29, 2009 Share Posted July 29, 2009 Scheduling a job is probably the only way to get it done reliably. Link to comment https://forums.phpfreaks.com/topic/167929-php-batch-trigger/#findComment-885710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.