ShareShortcuts
Fork “Sleep Timer”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so gramps gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
63K
Saved
0
Actions
15
Category
Music
Version
1.0
Language
EN

Preview

Plays a selected playlist for a selected period of time, either locally, or to a remote speaker and then shuts down. Perfect to play quiet music while you fall asleep. Note: the timer app must be set to 'stop playing' when the timer ends. This is not programmable in shortcuts.

Adjust the code for your playlist and speaker name.

What's New

Version 1.0

First release

Version History
1.0 Mar 25, 2020

First release

What it does

15 actions
  1. Show Notification
    Timer app must be set to "Stop Playing" when timer ends.
  2. Setplaybackdestination
  3. Choose from Menu
    Play Duration (mins)?
  4. Choose from Menu
    15
  5. Start Timer
  6. Choose from Menu
    30
  7. Start Timer
  8. Choose from Menu
    45
  9. Start Timer
  10. Choose from Menu
    60
  11. Start Timer
  12. Choose from Menu
    Continuous
  13. Set Volume
  14. Play Music
  15. Open App

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define color darkorange
#define glyph clock

showNotification("Timer app must be set to \"Stop Playing\" when timer ends. ", "Important", false)
rawAction("is.workflow.actions.setplaybackdestination", {
	"WFMediaRoute": ""
})

const MenuResult = menu " Play Duration (mins)?" {
item "15":
	startTimer()
item "30":
	startTimer()
item "45":
	startTimer()
item "60":
	startTimer()
item "Continuous":
}
setVolume(0.18214285)
playMusic(, "Songs", "All")
openApp("com.apple.Music")
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by gramps

See All

You Might Also Like

See All
Advertisement