forumnz Posted January 17, 2009 Share Posted January 17, 2009 If I have a number in a MySQL database that I want reducing by a value every few seconds.. how can I do this? Would I have to use a cron job? Or is there another way? Link to comment https://forums.phpfreaks.com/topic/141249-reducing-integer-value/ Share on other sites More sharing options...
Mchl Posted January 17, 2009 Share Posted January 17, 2009 Cron job will be the best way until scheduler is introduced into MySQL. Link to comment https://forums.phpfreaks.com/topic/141249-reducing-integer-value/#findComment-739322 Share on other sites More sharing options...
Mark Baker Posted January 17, 2009 Share Posted January 17, 2009 If I have a number in a MySQL database that I want reducing by a value every few seconds.. how can I do this? Would I have to use a cron job? Or is there another way? You'd have to use a cron job, although I believe cron tasks can't run at intervals of less than a minute You can't rely on anything that is run from a web interface to execute at the required interval The only alternative is to have a job that is permanently (no timeout) running on the server, that sleeps for a few seconds, wakes up, updates your number, then goes back to sleep Link to comment https://forums.phpfreaks.com/topic/141249-reducing-integer-value/#findComment-739323 Share on other sites More sharing options...
balaganesh.k89 Posted January 18, 2009 Share Posted January 18, 2009 If I have a number in a MySQL database that I want reducing by a value every few seconds.. how can I do this? Would I have to use a cron job? Or is there another way? store that value as a negative number... Link to comment https://forums.phpfreaks.com/topic/141249-reducing-integer-value/#findComment-739680 Share on other sites More sharing options...
Mchl Posted January 18, 2009 Share Posted January 18, 2009 If I have a number in a MySQL database that I want reducing by a value every few seconds.. how can I do this? Would I have to use a cron job? Or is there another way? store that value as a negative number... And? Link to comment https://forums.phpfreaks.com/topic/141249-reducing-integer-value/#findComment-739684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.