Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
提交时指定任务在某些任务达成某一状态后才能启动,示例:
cbatch test.sh -d=afterany:1
表示当前任务test.sh必须在编号为1的任务结束(包括取消、超时、失败、运行完成)后开始。
目前支持的依赖类型:
after
:在依赖任务开始或取消后才能开始afterok
:在依赖任务已0的返回值运行结束后才能开始afternotok
:在依赖任务结束但并非成功运行后开始(包括返回值不为0)afterany
:在依赖任务已任何原因结束后才能开始一个任务可以依赖多个任务,要么要求达成全部条件,要么要求达成其中一个,两种情况分别使用
,
或?
分隔要求,示例:cbatch test.sh -d=afterany:1,after:2
:要求在任务1结束且任务2已经开始或取消后才能启动cbatch test.sh -d=afterany:1?after:2
:要求在任务1结束或任务2已经开始或取消后才能启动当依赖条件相同时,允许简写,用
:
分隔依赖任务编号,示例:cbatch test.sh -d=afterany:1:2,after:3
:要求在任务1、2全部结束且任务3已经开始或取消后才能启动cbatch test.sh -d=afterany:1:2?after:3
:要求在任务1、2其中之一结束或任务3已经开始或取消后才能启动当没有使用
,
或?
分隔时,默认为需要全部满足。对于 calloc 退出总视为运行成功,cbatch 和 crun 任务正常判别返回值。