Add option to ignore CRON jobs to get-queue

This commit is contained in:
Lockszmith 2023-10-25 10:13:14 -04:00
parent c76c8b2517
commit 0cb036fb41
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#! /usr/bin/env bash
midclt call core.get_jobs | jq -r '.[] | select( .time_finished == null ) | "\(.id) - \(.arguments[0])"'
IGNORE_CRON=${1:-$IGNORE_CRON}
CRON_TEST="${IGNORE_CRON:+and (.method != \"cronjob.run\")}"
midclt call core.get_jobs | jq -r '.[] | select( (.time_finished == null) '"${CRON_TEST}"' ) | "\(.id) - \(.arguments[0])"'