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!

Enterprise Security Content Update (ESCU) v3.54.0

The Splunk Threat Research Team (STRT) recently released Enterprise Security Content Update (ESCU) v3.54.0 and ...

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

New Learning Videos on Topics Most Requested by You! Plus This Month’s New Splunk ...

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...