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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...