Reporting

Cronjob for 48 hours

N92
Path Finder

How to set report for every 48 hours. What should be cronjob for that.

If I am set "* * */2 * *". It can run at every two days(48 hours). But there should be issue at month end because it can be 30 0r 31 days/month.

Tags (1)
0 Karma
1 Solution

FrankVl
Ultra Champion

Don't think there is any way to do that in a pure cron schedule solution. You can either define it by day of month or day of week, both will cause issues since months regularly have an odd number of days and weeks by definition have an odd number of days.

I would seriously consider rethinking whether it really needs to be a 48h report. Can't it be daily?

Or can it be on specific week days, e.g. every monday, wednesday, friday (which is something you can define in cron)? Although I guess the trouble with that is that if you define the search to include past 48h, there will be a gap somewhere around friday/saturday depending on the exact timings.

View solution in original post

0 Karma

FrankVl
Ultra Champion

Don't think there is any way to do that in a pure cron schedule solution. You can either define it by day of month or day of week, both will cause issues since months regularly have an odd number of days and weeks by definition have an odd number of days.

I would seriously consider rethinking whether it really needs to be a 48h report. Can't it be daily?

Or can it be on specific week days, e.g. every monday, wednesday, friday (which is something you can define in cron)? Although I guess the trouble with that is that if you define the search to include past 48h, there will be a gap somewhere around friday/saturday depending on the exact timings.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...