Alerting

Cron Expression

anuj1630
New Member

Hi,
I want a cron expression for executing a query every day @ 12:45PM. The cron expression I used is : 0 45 12 * * ?. But I am getting an error stating "invalid interval, must be an integer or cron expression". Please help.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Cron strings are minute hour date month day so your example was telling Splunk to run the query at 45:00 on the 12th of every month. Try 45 12 * * *.

---
If this reply helps you, Karma would be appreciated.

hardikJsheth
Motivator

In addition to answer provided by @richgalloway, the cron schedule can't have more than five characters. For getting correct cron https://crontab.guru/ is good site.

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

Weird Windoze does a 6th field, which does seconds. I suspect that is the source of the incorrect cron in the question. Go with Rich's answer.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...