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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...