Reporting
Highlighted

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

Explorer

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
Highlighted

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

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




| eval message="Happy Splunking!!!"


0 Karma
Highlighted

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

Explorer

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
Highlighted

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

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
Highlighted

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

Explorer

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

0 Karma