I haven’t actually used this script before but I’m guessing @Pectojin or @kenkendk will have a suggestion for you.
For what it’s worth, a feature like you describe has been requested a few times already:
I have just added a $5 bounty for this feature at https://www.bountysource.com/issues/52436819-feature-request-bandwith-limit-based-on-schedule (just to kick things off). Please consider adding to it to help make it happen!
Bandwith limit based on schedule [$35] · Issue #2921 · duplicati/duplicati · GitHub