There is an hd-idle command, which is provided by the System Tools add-on:
Post
RE: [HD-Idle Add-on] Works Once Per Boot
Anode
It is difficult to have an explanation for your problem because you tell us almost nothing. So, I will explain what I do and I assure you that it works perfectly:
My system consists of three drives, 'sda' is the LE drive, and 'sdb' and 'sdc' are my USB storage drives, in these conditions I run the following commands in /storage/.config/autostart.sh :
/storage/.kodi/addons/virtual.system-tools/bin/hd-idle -a sdb -i 300 -l /storage/hd-idle.log
…
It is difficult to have an explanation for your problem because you tell us almost nothing. So, I will explain what I do and I assure you that it works perfectly:
My system consists of three drives, 'sda' is the LE drive, and 'sdb' and 'sdc' are my USB storage drives, in these conditions I run the following commands in /storage/.config/autostart.sh :
/storage/.kodi/addons/virtual.system-tools/bin/hd-idle -a sdb -i 300 -l /storage/hd-idle.log
…

elonesna
It also generates a log file, so maybe helpful for further investigations.