Getting Data In

How to schedule a search to run every morning at 6:00AM?

mattkun
New Member

Hi,

We have a search that retrieves data for the last 24 hours and will send a CSV to an email distribution list. I am wondering if we can set up a schedule to have this search run everything at 6am. I have tried to set up a schedule via Splunk Web, but it is not running at all in the morning. Thank you.

0 Karma

yannK
Splunk Employee
Splunk Employee

use the cron notation.

0 6 * * * *

it means minute zero, hour 6 (in a 24h notation), repeat every day of the week, every week, every month...
the timezone will be the one of your user profile. (or the system timezone if the search is not owned by anyone)

0 Karma

Richfez
SplunkTrust
SplunkTrust

When you have your search working properly as a regular search, you'll need to follow the process here at the Schedule Reports docs page. You'll want to be sure to schedule a report, not an alert.

Did you set up your SMTP settings in ... settings, server settings, email settings? That has to be correct and work before anything else will work.

If you have SMTP set up and if you schedule a report that doesn't work, then what I usually do is schedule the report to email every, say, 5 minutes, and tail or check the end of $SPLUNK_HOME\Splunk\var\log\splunk\python.log. Be sure to unset the schedule after you've found good logs! You can probably google or stare at those logs for a few moments and it might tell you what's wrong, and if not paste the few pertinent bits in here and we can probably help you figure that out.

Good luck!

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...