From 0cb036fb41aeddcfa1c4fd162929eb13cd7007e1 Mon Sep 17 00:00:00 2001 From: Lockszmith Date: Wed, 25 Oct 2023 10:13:14 -0400 Subject: [PATCH] Add option to ignore CRON jobs to get-queue --- get-queue.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/get-queue.sh b/get-queue.sh index 0163a75..66bdc17 100755 --- a/get-queue.sh +++ b/get-queue.sh @@ -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])"'