With the Shortcuts app (included on any iPhone with iOS 13 or later) you can start an action at sunrise or sunset. This can be useful for setting alarms, playing music and other tasks. Here’s how to set it up.
First, open the Shortcuts app. If you cannot find the icon, swipe down from the center of the screen with one finger. Type “Shortcuts”
Tap “Automation” at the bottom.
If you’ve previously set up automations on your iPhone, tap the plus sign (+), then tap Create Personal Automation. If this is the first automation you’ve ever created, tap ‘Create Personal Automation’.
In the ‘New automation’ menu, tap ‘Time’.
Here you can select whether the automation will be activated at ‘Sunrise’ or ‘Sunset’.
In the next menu you can select a time offset, such as ’30 minutes before sunset ‘or’ At sunset ‘. The same goes for the sunrise options. Select the option you want and tap Done.
After you select ‘Sunrise’ or ‘Sunset’ and you want the action to repeat ‘Daily’, ‘Weekly’ or ‘Monthly’, tap your preference. If you want something to happen every day at sunrise or sunset, tap Daily.
Tap “Next” to go to the “Actions” menu. Here you define what you want to happen at sunrise or sunset. You can select any action available in shortcuts, including showing an alert, setting a timer, launching an app, and more. You can also link multiple actions together.
In our example, we set our action to play a song from our Apple Music Library.
After you have defined your action (s), tap ‘Next’. You see an overview of the entire automation. Tap a section here to go back and make changes.
Disable the “Ask Before Running” option before continuing. In the confirmation popup that appears, tap ‘Do not ask’. With this enabled, your automation will not work unless you check your screen and confirm it first.
Tap “Done” and you will see the automation you just created in your “Automation” list.
If you ever want to turn off an automation, tap it in the “Automation” list. Disable the option “Enable this automation” in the next menu.
You can return to the “Automation” section in the Shortcuts app at any time to re-enable an automation. If you ever want to completely delete an automation, just swipe it to the left in the list and tap ‘Delete’.
Have fun automating!