Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Run a cron process more than every minute' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Run a cron process more than every minute
Authored by: viadd on May 17, '07 09:00:55PM

The expression "${dt} - \( ${now} % ${dt} \)" always gives a value from 1 to 15 (for dt = 15). The '%' operator takes the remainder when now is divided by 15, which is always in the range 0-14 , and 15 minus that puts it in the 15-1 range, respectively.

Thus there won't be any cases of sleep 0, even if open takes 0 seconds.

[ Reply to This | # ]