I'm looking for a way to schedule when an external hard drive connected to my Linux (Debian 9) box goes to sleep (stops spinning).
To put this into content: I have a Linux box that runs as a multimedia server. If a call is made to fetch content that is on the external hard drive, it often takes 15-30 seconds for the hard drive to wake and start spinning which a) is frustrating and b) sometimes causes timeouts with the multimedia server. I could set the hard drive to be awake and spinning 24/7, but this seems a waste when most of the time I only use the multimedia server when I'm at home.
Is there any software tool or command I could use to set a weekly schedule for when the hard drive is spinning - e.g. Monday-Friday: SPINNING between 5pm and 11pm Saturday-Sunday: SPINNING between 3pm and 11pm OTHERWISE SPINNING on demand and sleep as per system timer