Alerting

How do I schedule a cron job to run every 6 hours, which should start at a particular time?

varad_joshi
Communicator

I need to start a cron job where I am setting up alerts every 6 hours using * */6 * * * in cron. However I want first alert to get triggered at a particular time. where do I set that?

This could be fairly simple, a newbie here 🙂

Tags (3)
0 Karma
1 Solution

FritzWittwer_ol
Contributor

or you can just use commas:

57 1,7,13,19 * * *

Means on the 57th Minute of the hours 1, 7, 13 and 19

View solution in original post

FritzWittwer_ol
Contributor

or you can just use commas:

57 1,7,13,19 * * *

Means on the 57th Minute of the hours 1, 7, 13 and 19

varad_joshi
Communicator

Like I said it could be fairly simple. One of the colleague @meenal901 also suggested.
Thanks this was helpful.

0 Karma

lloydd518
Path Finder

I don't think cron can quite meet your requirement but I have produced a couple of examples where we can try and manipulate cron which may help you solve your problem..

57 7-23/6 * * *

This schedule runs on the 57th minute of the the hour - between 7am and 11pm every 6 hours... So in splunk it fires at 7:57 13:57 19:57 And back to 7:57 the next day...

00 1-23/6 * * *
This schedule runs at the start of the hour 00min between 1am and 11pm every 6 hours.... So in splunk it fires at 01:00 07:00 13:00 19:00 And back to 01:00 the next day...

00 5-24/6 * * *
This schedule runs at the start of the hour 00min between 5am and 12am every 6 hours.... So in splunk it fires at 05:00 11:00 17:00 23:00 And back to 05:00 the next day...

So this may help you but it can end up missing a period as in the first example which only fired 3 times as opposed to the next 2 examples which fired off 4 times...

Hope this helps...

lloydd518

Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...