4 ms·
> One problem that becomes apparent with a longer interval and longer rebuild times: if the make takes say 30s, and you're rebuilding every 60s, then your site
by 1amzave 14y ago
> One problem that becomes apparent with a longer interval and longer rebuild times: if the make takes say 30s, and you're rebuilding every 60s, then your site will be updated every 1.5 minutes instead of every minute. Maybe not what you want.
Easy enough to fix without resorting to a specialized tool:
while true; do make all & sleep 1m; done
(Changing the sleep to a minute instead of a second, which may have been what you intended.)
That way you'll kick off a 'make all' once per minute regardless of how long it takes. That in turn might not be what you want if your make takes more than a minute, but then it's also simple enough to extend it thusly:
while true; do make all & sleep 1m & wait; done
which will do the same but avoid having multiple makes running concurrently (if a minute elapses and the previous invocation hasn't finished yet, it waits for it before starting the next one).
- sigil 14y agowhile true; do make all & sleep 1m; done Welcome to orphan land. (^C to see.) Don't do this folks. The 'make all' invocations may also potentially overlap and corrupt your builds. To be fair, you fixed that issue here: while true; do make all & sleep 1m & wait; done But the orphan issue remains.