How to get all Jenkins job ran between specific dates?

Hi There,

I am looking for a way to gather Jenkins’s usage statistics such as builds run every month or day. I came across a script at jenkins-scripts/jobExecutedInDateRange.groovy at cb8bd1787c2679562b7648785d2ebf4936f408d8 · jenkinsci/jenkins-scripts · GitHub. However, it is not working as expected.

global-build-stats is also not working as expected and we don’t want to use this plugin for security reasons.

How can I achieve this? Please advise.

Thanks in advance!

Hello and welcome to this community :wave:

If the existing scripts and plugins are not meeting your requirements, you could maybe consider using the Jenkins API to gather usage statistics.
I think Jenkins provides a RESTful API that allows you to fetch information about builds, jobs, and other Jenkins-related data.
I don’t say it’s the best approach, just food for thought.