Other Usage

How to set up a report to run on the third Monday of every month?

Rowank
New Member

Hi 

Wanting to setup a Report to run on the third Monday of every month.
Is there a way to do this?
Any Cron Schedule I try doesn't allow me to commit the change.

Such as: 0 8 * * 1 [ "$(date +\%d -d 'today + 14 days')" -gt 14 ] && [ "$(date +\%u -d 'today + 14 days')" == 1 ] && echo "Run report"

Labels (2)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

I think that this is working https://crontab.guru/#00_00_15-21_*_1

1 1 15-21 * 1

3rd Monday is between 15th and 21st day and last day field select it to run only Monday on those days.

r. Ismo

Rowank
New Member

Hi @isoutamo 

Seems as though this cron schedule is running every Monday.
It ran last Monday and splunk is showing it will run next Monday.
Even though it should only be running the Monday after that.  

0 Karma

isoutamo
SplunkTrust
SplunkTrust

In some cron versions it needs that you will change 15-21 to 15,16,17,18,19,20,21.

0 Karma

Rowank
New Member

Thanks for the response.
I will let you know if it works next month!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...