Any suggestions for a script that should only be s...
# general
e
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
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
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
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.
e
Thanks for the suggestions!