I have an action in my controller that generates reports of site usage based on date range selected (Start and End Date) with the condition that the start and end date has to be within the current quarter.
I want to implement a background job
that will generate this report at the end of each quarter and make it available for download as a link on the view page.
Each quarter is 3 months and so for example - On March 31st 11:59 PM
, I want it to generate the report of site usage from Jan 1st to March 31st and make it available for download in the view page.
I prefer using the whenever gem
if possible, since i am already using it for re-indexing the models at definite intervals. All possible suggestions are welcomed !!
Please help me with how to go about this !!