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
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