Any suggestions for a script that should only be scheduled to run during business hours since there is no end time on Script schedules?
c
creece
10/01/2021, 7:07 PM
You can only control when it starts unless you limit your data inputs to be smaller chunks that can run faster or purchase additional processors.
p
Peter Ries
10/03/2021, 2:50 AM
You'd have to write code into the script itself. So, it would start per NS deployment schedule, but then "return" if the "new Date()" time is after, say, 5:00pm.
r
Richard Marques
10/05/2021, 11:41 AM
Echoing Peter: stick the guts of the logic in a custom module script type and the scheduled script can do the time checking to decide whether to call it or not. We use this pattern to also expose the CM via a RESTlet so external systems/schedulers can execute it on demand.