Android: You might wish your favourite music app had a sleep timer option to turn the music off after a set amount of time, or you may resent having an extra alarm clock app on your phone just so you can wake to your favourite music. There’s no reason to download special apps for these features when you can just set them up with Tasker.
If you want to fall asleep to music and have it stop at a certain time, set up the StopMusic task and connect it to the Tasker Timer Widget. You can create a music alarm the same way (but with a StartMusic task instead of StopMusic). There are a few different options that will work for different devices, and the guide explains alternate routes you might have to take for each task. Regardless, it’s simple, even for new Tasker users. Check out Android Authority’s full guide for more.