On Fri, May 25, 2018 at 4:13 AM, Taewon <[email protected]> wrote:
> I am considering to use a shell var having halt time. when time over the
> halt time, just exit. I cannot imagine better way to prevent new job
> starting.
>
> any better idea?
So you want to start parallel, let it run for 10h and the ask it to stop nicely.
One way to do that is to wrap it with parallel:
doit() { parallel --tag 'echo {};'sleep {} ::: {1..100}; }
export -f doit
parallel --timeout 3 --termseq TERM -u doit ::: dummy
/Ole