Alerting

what format should cron be when setting up a schedule

HattrickNZ
Motivator

sorry forthis simplistic question I just can't work it out from the instructions.

here I want to set up a cron job to run every day at 3:03 a.m.

when seeting up a cron job(see pic beow) what format should the paramter be in in the input box below in the pic:
1 - no quotes
03 3 * * *
2 - single quotes
'03 3 * * *'
3 - other single quotes forget the name
03 3 * * *

alt text

Tags (3)
0 Karma
1 Solution

MuS
Legend

Hi HattrickNZ,

well, have you tried to use ' or " in the cron field?
If you do so, you will get this error:

Encountered the following error while trying to save: In handler 'savedsearch': Invalid cron_schedule="'* 5 * * *'"

So, the answer is: No quotes of any kind are needed in the cron entry field.

cheers, MuS

View solution in original post

0 Karma

MuS
Legend

Hi HattrickNZ,

well, have you tried to use ' or " in the cron field?
If you do so, you will get this error:

Encountered the following error while trying to save: In handler 'savedsearch': Invalid cron_schedule="'* 5 * * *'"

So, the answer is: No quotes of any kind are needed in the cron entry field.

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...