Is there any way to restrict a report from running of during certain times of day/certain days. Customers sometimes have reports that take up a large amount of processing time and slow their systems down. If the report is not critical, it would be useful for an admin to be able to restrict what times it can be run.
As far as I know, there isn’t a system-level means of restricting when a report can be run, though you can restrict who is allowed to run it.
It would certainly be possible to create a validation logic block that runs on application Pre-Save or at the beginning of report execution that has a hard-coded limitation:
If CurrentTime > 8 am and CurrentTime < 5 pm -> Error, for example. This could be a common logic block that all to-be-restricted reports can call, and it could even rely on a custom module settings value rather than having a hardcoded time.
Follow-up questions, would it be possible to delay the running of the report to a specific time, and then inform the user of what time it will be run?
Possibly a compensating transaction could do this?
Compensating transactions were deprecated with the 24.2 release, so that won’t be an option.
When it comes to delaying a user’s request until a certain time, there are probably some creative solutions for accomplishing that in an app but the platform doesn’t natively support it as far as I know. Effective Date workflow transitions come to mind.
While this isn’t an exact answer, you could also use a job scheduler to run the report on a specified cadence and keep users from needing to run it at all.