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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...