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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...