Alerting

Cron schedule in Splunk Cloud to run every second Tuesday of the month

nabeel652
Builder

Hello Splunkers

I have a requirement to run an alert on second Tuesday of each month at 5:30am. I came up with 

 

30 05 8-14 * 2

 



However, Splunk tends to run it every Tuesday regardless of the date being between 8th to 14th. 

Is this a shortcoming in Splunk or I'm doing something wrong?

Labels (3)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @nabeel652 ,

if the alert must run only one the second Tuesday of the month, you could use your cron and add a condition in the alert, that the day of mont must be between 8 and 15:

<your_search> (date_mday>7 date_mday<16)
| ...

Ciao.

Giuseppe

0 Karma

nabeel652
Builder

Thanks for the reply. Sorry that's not what I want to achieve. My search spans over last 30 days - This will only make it look for the timespan > 7 and < 14 days. 

I want Splunk to run this search on the given Cron schedule not to change the search time span. 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @nabeel652 ,

for my knowledge, you can schedule a search using cron on Tuesday, but not on the second Tuesday.

To do this, the only way is adding a contrain to the search.

Ciao.

Giuseppe

nabeel652
Builder

Thank you. That's what I thought too. However, 

30 05 8-14 * 2


is a valid cron and Splunk should consider fixing this 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...