Alerting

Cron expression for splunk alert

shashi584
Explorer

I Want to create one splunk alert where it runs on all weekdays and Pause at "Friday 11:59 PM CST " and resume at Sunday 11:59 PM CST"

Can you help me with a Cron expression that satisfies the above requirement?

I need the alert to be set up in CST time zone only

 

Labels (1)
0 Karma

shashi584
Explorer

Hi @gcusello 

 

Thanks for the reply, Yes i tried the below Expression which runs every hour past 30 minutes from Mon-Fri

30 * * * 1-5

However, my requirement is to Pause at "Friday 11:59 PM CST " and resume at Sunday 11:59 PM CST" which is tricky part and not sure how to set up in CST time zone.

 

In My preference, if i set up in CST time zone , will that work ?

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @shashi584,

the it isn't possible to setup the timezone in the cron expression, it define the hours of execution, if you have a time in CST or a different timezone it a definition of your system, not of cron.

Ciao.

Giuseppe

gcusello
SplunkTrust
SplunkTrust

Hi @shashi584,

did you tried with

* * * * 1-5

you have to define the condition for the fifth parameter (1-5) then you can define the dayly frequency, e.g. every hour it could be:

0 * * * 1-5

Ciao.

Giuseppe

 

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...