If you own the server hardware and software you could always limit the hours that MC is even available... I don't know what you can do with a rented server as I've never had one.
I've never set up a Minecraft server (hundreds of others, used to be my career) so I don't know what server management utilities exist.
Most professional server Operating Systems (Unix/Linux, OS/2 Lan, Microsoft Server) can be configured to only permit an account to logon on certain days, like Mon-Wed-Fri, and certain times of day like 9am-5pm.
I don't know about limiting by duration (4 hours from logon you get warned then booted) but that situation never arose in the Business settings I was in.