Jump to content

Reducing integer value


forumnz

Recommended Posts

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

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.