Splunk Search

How to compute next cron iteration from _raw event?

cdaviet
Explorer

Hi,

I have a last run epoch time and a cron schedule (i.e. : "*/5 * * * *") in an _raw event and I'd like to parse these information to output the next run.

Do you have any idea how to do this?

I found this addon :https://splunkbase.splunk.com/app/4078/ but it does not allow me to use a custom "last run time" and always takes the earliest time of my search as an input.

Thanks 🙂

Labels (1)
Tags (1)
0 Karma

gjanders
SplunkTrust
SplunkTrust
0 Karma

cdaviet
Explorer

I tried it but I've got errors using the command

0 Karma

isoutamo
SplunkTrust
SplunkTrust

I'm not sure what you are trying, but if you want to schedule the next run 5min after the current has ended then you can just use interval instead of cron expression. Then the next run starts after that interval. It start counting from the end on current/previous run.

r. Ismo

0 Karma

cdaviet
Explorer

No, the cron expression is in the _raw event. I don't have the interval.

 
 
0 Karma

isoutamo
SplunkTrust
SplunkTrust
So you want to get the next run time for that schedule?
0 Karma

cdaviet
Explorer

Yes 🙂

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...