On Wednesday 31 December 2008, Yuval Hager wrote: > On Tuesday 30 December 2008, shimi wrote: > > On Tue, Dec 30, 2008 at 9:19 PM, Oleg Goldshmidt <p...@goldshmidt.org> wrote: > > > shimi <linux...@shimi.net> writes: > > > > There's The Fault Tolerant Shell[1], that assumes that running for > > > > too long is 'a fault', which you might use. > > > > > > I am not sure - the typical use case of ftsh is to keep trying for so > > > many times or for such and such time interval if your task keeps > > > failing. I understood the OP requirements as to be able to kill a > > > perfectly running application after a specified time interval. I am > > > not sure ftsh handles this case. > > > > I know what the typical use is, but... if you define "try one attempt" > > and "a failure is when the task is running more than 4 hours", > > essentially you build something that runs whatever you want, and assumes > > a failure after 4 hours, cleans it up gracefully, and that's it, no? > > Yes, I can confirm it works for me, albeit it is a bit strange that a > successful 6 hours rsync session ends with an error "script failed". > > I also wish ftsh project would look a bit more "alive" (and packaged for my > distro would be awesome). >
Another (petty) issue with using ftsh for this is that I cannot control start and stop times externally. I can start it using cron, but the script itself decides when the stop. So if instead midnight-6am I would like to change to 1am-5am, I need to change both cron and the script itself. Having the script run for a different amounts of time on different times is impossible to achieve this way. Script arguments might be the solution here, but again, I would love to have a uniform way to control start/stop times of the script. --y
signature.asc
Description: This is a digitally signed message part.