Cron / second precision ?
Hi there!
I'm wondering - CRON entry allows to set up a cron job with minutes, hours, days etc. But what if i need to do something at 6:23:38 ? I mean, i need second precision? |
Quote:
Code:
23 6 * * * sleep 38 && myjob |
Yeah, but sleep 38 means processor usage by 38 sec?
If yes, that is not the answer i was expecting on. I need to take carve about processor usage. |
Quote:
Quote:
/me wonders what cron job could require second precision, though. ;) |
Hmm what job?
Well, i'm a developer of Web-Based MMO, and some operation (as Battle calculations etc.), which calculating them by users interaction would take too much time. |
Cron is not intended for high-accuracy timing. It CAN be and is frequently off by several seconds (due to process start-up, etc.). If you need that kind of precision, I suggest running a daemon of your own to avoid process start-up overhead.
|
Quote:
How to do such thing? Coz I think i like it ;) I mean, i know I have to write it by my own (well, as for now - i'm onyl learning C++, so it could be kind of hard :P), but may be there are on internet some examples? |
Write a daemon (basically any continuously-running application) that handles the updates you need.
http://www.google.com/search?q=daemo...ient=firefox-a |
Quote:
|
All times are GMT -5. The time now is 11:15 PM. |