I think it might be a good idea to allow users to schedule different statistics archiving tasks at different times. This might be especially important for sites with a lot of traffic.
- Monthly statistics every month at the 31st around 04:00 GMT
- Weekly statistics every Sunday around 03:30 GMT
- Daily statistics every day at 03:00 GMT
This would distribute resource usage over various days and times. (Of course the times/days/dates are just for illustration.)
All that is really needed to make this happen is making 3 different archive.sh files:
(I’m not sure whether there are any more subdivisions which could be made.)
Let me know what you think
Edit: also (it’s possible that this is already available) it might be a good idea to allow users to set a custom ‘cut-off’ date for the statistics. Small likes might want 3 years of statistics to be available whereas big sites may rather export anything they deem of use every 3 months and then remove all the stats after that period in order to maintain a (relatively) small database.