You can do it with 2 scripts (UPM Profiles), one to power down the ports and one to power up.
I'm not sure whether you want to just power down the port or remove the inline power so just going to make these scripts generic, you can replace the statement parts with anything you want the switch to do.
create upm profile down
enable cli scripting
<statement>
.
create upm timer down-timer
configure upm timer down-timer profile down
# this runs the profile at set time and every day (86400 seconds)
configure upm timer down-timer at mm dd yyyy hh mm ss every 86400
you then need to create another one to bring it back up
create upm profile up
enable cli scripting
<statement>
.
create upm timer up-timer
configure upm timer up-timer profile up
# this runs the profile at set time and every day (86400 seconds)
configure upm timer up-timer at mm dd yyyy hh mm ss every 86400
The switch is clever enough to adjust the dates in its config so if for example the switch restarts and the upm timer value is set in the past but has the "every" keyword used, it will adjust the timer to kick in at the next cycle, so the next day in this example.
The only problem I can conceive and one which I'm currently trying to figure out is how to get round the switch being powered down during the time the script is supposed to kick in, this means that the required action won't be carried out until the next cycle. Rather than having 2 scripts to run at certain times there must be a way of checking the time within 1 script, comparing it to the actual time and then carrying out the required action. You could then just have this 1 script running every minute or so indefinitely.
Another concern I have is that if the switch is in the state where for example a port has been disabled due to the script and then someone logs onto the switch, makes some changes and saves the config. The switch will then revert to this configuration for the port if it is rebooted and will not come back up until the script starts running again. Being able to compare the time within the switch would be useful for this as well.