Open arnikz opened 4 years ago
The Xenon api does not have a method to ask for only non-zero exit code jobs. Only the statuses of a list of job identifiers can be requested.
You could use the JSON formatted output for filtering with jq, for example to get a list of failed job ids:
xenon --json scheduler slurm --location ssh://localhost:10022 \
--user xenon --password javagat list --identifier 2 \
| jq '.statuses | map(select(.done and .exitCode != 0)) | map(.jobIdentifier)'
I could add the following option to the list sub command:
--exclude-exitcode=0 Only list completed job statuses which do not have the given exit code.
This is a feature request: add option to list jobs with non-zero exit code. Currently, I use an ad hoc solution to post-process the output line(s).