Other Usage

Cron expressions for alert scheduling every month of 1st and 3rd Monday?

Anna1
Engager

Hi team,

Please help me out on Cron job.
cron expressions for alert scheduling every month of 1st and 3rd Monday

Thanks in Advance..!!

Labels (1)
Tags (1)

ITWhisperer
SplunkTrust
SplunkTrust

You could try this

5 4 1-7,15-21 * 1

However, according to crontab.guru, this would be the first and third week and all Mondays which is not what you have asked for.

Assuming the above doesn't work, you may have to go with

5 4 * * 1

And then put a check in your search to stop the report / alert returning results if the date is not in the first and third weeks.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Anna1 ,

you could try something like this:

0 0 1-7,15-21 * 1

that runs your alert on Monday, at 00.00 only if the Monday has month day 1-7 or 15-21.

Ciao.

Giuseppe

0 Karma

Anna1
Engager

I have already tried but its giving results like below and moreover job runs every day in between 1-7 and 15-21.

Anna1_0-1679564176722.png

 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...