Alerting

How to cron schedule for a specific time range?

marellasunil
Communicator

How do I schedule a search to run every Friday morning at 11 am until Sunday morning at 9 am using a cron job?

Labels (2)
Tags (2)
0 Karma
1 Solution

lukejadamec
Super Champion

The third position is day of the week, with 0 = Sunday.

So if you want to run something every Friday it would be 5.

The second position is hour.

* 11 5 * *

Will run every Friday at 11.

Schedule the search time frame to look back to Sunday at 9, eariest=-122h@m latest=now.

View solution in original post

0 Karma

andreaswpv
Explorer

if it is this: minute | hour | Day of month | Month| Day of week
then it should be
full hour | 11 hours | any day of the month | any month | 5 day of the week (0=Sunday)

  • 11 * * 5
0 Karma

andreaswpv
Explorer

so, this post is swallowing some characters when being published, as it actually had 5 positions in the cron .
Let's try again (this time correct):

Zero eleven asterix asterix five

0 11 * * 5

0 Karma

prakashbhanu407
New Member

minute | hour | Day of month | Month| Day of week

then it should be * 11 * * 5 for Every Friday at 11

0 Karma

marellasunil
Communicator

Yes, starting from Friday 11am till Sunday 9am every 5 mins.
actually splunk alert schdule

0 Karma

timmalos
Communicator

Question is how often you want this search to be run in your timerange (Friday 11am --> Sunday 9am)

0 Karma

lukejadamec
Super Champion

The third position is day of the week, with 0 = Sunday.

So if you want to run something every Friday it would be 5.

The second position is hour.

* 11 5 * *

Will run every Friday at 11.

Schedule the search time frame to look back to Sunday at 9, eariest=-122h@m latest=now.

0 Karma

marellasunil
Communicator

every week

0 Karma

jonuwz
Influencer

how often ?

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...