how to code a timer loop in a sh script

Tim Daneliuk tundra at tundraware.com
Mon Nov 6 20:38:28 UTC 2017


On 11/06/2017 12:28 PM, markham breitbach wrote:
> Any reason not to use cron for this?


I don't know the OP's use case, but one reason to NOT use cron is
that it's hard to maintain state information across iterations.

In an infinite loop as a number of us have described, the script
can keep track of state as each iteration executes, to be used
by the next iteration.

While that's possible across cron invocations, it's generally a lot
uglier to to ....

-- 
----------------------------------------------------------------------------
Tim Daneliuk     tundra at tundraware.com
PGP Key:         http://www.tundraware.com/PGP/



More information about the freebsd-questions mailing list