parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: halt after some time


From: Ole Tange
Subject: Re: Q: halt after some time
Date: Sun, 3 Jun 2018 23:47:22 +0200

On Fri, May 25, 2018 at 4:13 AM, Taewon <tkang007@gmail.com> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]