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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...