Alerting

Cron not function properly

efelder0
Communicator

I have setup a cron in order to run a search at 8am everyday. Here is the syntax:

* 08 * * *

The search did get executed at 8am, but ran every minute between 8-9am.
I only need the search to run once each day.

Thoughts?

Tags (1)
1 Solution

Ayn
Legend

Well the initial * in your cron schedule specifies the minute, so when you specify * 8 at the beginning that's equal to saying every minute when the hour has the value 8. In order to have it run just at 8:00, just put 0 in the minute part:

0 8 * * *

View solution in original post

broberg
Communicator

I use sites like http://crontab.guru/ to make sure that i get my cron jobs right.

0 Karma

1206chandra
Explorer

every day :
0*/8***

0 Karma

wayne_zhou
New Member

the first * specifies the every minute. so you should write like 0 8 * * *

0 Karma

Ayn
Legend

Well the initial * in your cron schedule specifies the minute, so when you specify * 8 at the beginning that's equal to saying every minute when the hour has the value 8. In order to have it run just at 8:00, just put 0 in the minute part:

0 8 * * *
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...