parallel
[Top][All Lists]
Advanced

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

Using --limit and --halt-on-error Together


From: Larry Ploetz
Subject: Using --limit and --halt-on-error Together
Date: Mon, 30 Mar 2020 13:21:03 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Possible new feature - have --halt-on-error end ‘now’ or ‘soon’ based on the return code of the command used in --limit.

Just an example; it certainly doesn't have to be implemented this way:

parallel --limit '[[ $(date +%s) -ge 1585465200 ]]' --halt-on-error soon,limit=1 …

would run until midnight tonight, finish any jobs running, then quit without running any more jobs. Another example closer to what I want to accomplish right now:

parallel --limit '[[ $(stat -c %a -f /filesystem) -gt 100000 ]]' --halt-on-error soon,limit=1 …

Would run something that consumes disk space, and stop running new jobs when the free disk space got below 100,000 blocks.

I'm not sure what implication of --halt-on-ereror soon,limit=3% would be though.

Thanks for the wonderful parallel universe!
– Larry

Attachment: pEpkey.asc
Description: application/pgp-keys

Attachment: pEpkey.asc
Description: application/pgp-keys


reply via email to

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