Hi! We implemented also an API based script in PERL on same pourpose just for one host and a wrapper script to parse a csv file for a custom list of hosts. The wrapper takes as parameter the csv and calls the downtime script.
I would not use a scheduled downtime, but a TimePeriod with the hours and frequency you want to exclude in them. Then using that in conjunction with “check_period” (if you do not want the various checks to be done at all) or as part of a “Notification” set where is is the “period” so the checks are done, but not reported for the desired hours. You can use a Timeperiod with scheduled downtimes as well if that is what is needed.