Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show all Currently Running Jobs for all Projects in Rundeck

Tags:

rundeck

On my Rundeck there are multiple projects and jobs under these projects are triggered by schedule and some run for a a few minutes to an hour.

I want to restart the rundeck server to apply some configuration changes without having to affect these jobs so I want to know if there are any currently running jobs from each projects.

I know I can manually go through each project and check each running job but i want to see all of it at once.

Is this possible?

like image 417
DRTauli Avatar asked Nov 01 '22 13:11

DRTauli


2 Answers

In case it's still relevant:

You can either query the DB directly: H2/internal or external wherever you've put it.

Or using the API (simply list all projects and query for each one the running jobs.

like image 72
user1982813 Avatar answered Jan 04 '23 14:01

user1982813


It can be done using the CLI with something like:

for i in $(rd projects list | grep -v ^#); do
  rd executions list -p $i;
done
like image 42
Atanas Avatar answered Jan 04 '23 14:01

Atanas