Reporting

How to run a scheduled report with Cron config on the first monday of each month?

DavidCaputo
Path Finder

hello,

I have scheduled a report with cron config, to run this report on the first monday of each month.
My cron is : 45 3 1,2,3,4,5,6,7 * 1

This was working well until now... but after splunk upgrade (6.6.3 to 7.2.6), it looks like Splunk doesn't recognize this cron definition, and the report is run every day...

Any idea of a solution or workaround ?

Thanks
David

0 Karma

martynoconnor
Communicator

Plenty of suggestions here - https://superuser.com/questions/428807/run-a-cron-job-on-the-first-monday-of-every-month

However, I'm not sure if Splunk would natively support complex cron schedules. If not, you can make the search one that can be called via the CLI or REST API by an external script if the cron job triggers.

0 Karma

DavidCaputo
Path Finder

Thanks for your suggestion. I'm going to try this.

0 Karma

niketn
Legend

@DavidCaputo above cron schedule does not seem to pick 1st monday of each month. Have you verified?

http://cron.schlitt.info/index.php?cron=45+3+1%2C2%2C3%2C4%2C5%2C6%2C7+*+1&iterations=50&test=Test

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

DavidCaputo
Path Finder

hello,
You're right, my cron schedule doesn't work... I created this few months ago and apparently it was working... until this morning. Sorry for the post, I have to find to "good" cron schedule

David

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...