I installed a 2nd HDD in my 2012 macbook pro 13" about a year ago, and i used this script that i found online to put my drive to sleep and wake it up:
tell application "Finder" if not (exists the disk "HDD") then do shell script "diskutil mountDisk 'disk1'" else do shell script "diskutil eject 'disk1'" end if end tell
That worked out just fine until I upgraded to El Capitan. Now I can still put my disk to sleep, but after 10-20 seconds it spins back up. I have tried all tips from this thread, by setting idle time to one minute, preventing spotlight from indexing and searching the disk and now I am completely out of ideas. Do anyone have any ideas?