Reporting

How to use cron schedule to automatically send a report on the last day of each month?

zoe
Path Finder

Hi, 

I would like to send a report  via Splunk automatically on the last day of each month.  In this case, I am afraid that I need to use cron schedule. Dose anyone have an idea?

Thanks in advance!

Tong

zoe_0-1663318567355.png

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Unfortunately Cron haven't any (direct) way to run it only on last day of every month. The easiest way is just run it on 1st day of month if possible?

If you really need to run it on last day of every month, then you must create some additional logic on your job. It should check if tomorrow's day is 01 and then execute it otherwise stop. This may help you https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Require?

Another way (not perfect as there are leap years) is just divide that to several entires based on amount of days per month.

Here is some additional discussion about this issue: https://stackoverflow.com/questions/6139189/cron-job-to-run-on-the-last-day-of-the-month

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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