breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
2.96k stars 80 forks source link

[feat] function to list all runnning jobs #205

Open spyshow opened 1 year ago

spyshow commented 1 year ago

hi all

it would be great to have a function to list all the running jobs name i tried to search the document about such function but i found none

thanks and regards

AlvaroBrasilia commented 1 year ago

You can try this:

const jobsRunning = bree.config.jobs.map((j: { name: string }) => j.name)