Sunrise sunset - specific time before automation

I would like to create a specific shortcut which sends me a reminder one hour 38 minutes before sunrise and another reminder 25 minutes before sunrise . The timing is very specific and is related to sunrise. I cannot find any option where I can specify. How many hours and minutes before sunrise. Should I get a reminder I would like to create an automation to do so

What about creating an automation which runs once per day and sets time-based reminders in the Reminders app for those two times?

The get details of weather condition action in Shortcuts can get you those times and you can calculate the desired offset for each.

One limitation is you could vary your location from where you get the sun rise/set stime for. So keep that in mind if you travel any notable distance in between.

Apologies for the late reply

I would like to achieve the following and it is all related to sunrise

It is an auspicious hour for prayer which starts one hour 46 minutes before sunrise and ends 38 minutes before sunrise

The issue is that the settings are in increments of 5 minutes and in sunrise and sunset the options are extremely limited.

I would like to set an alarm for both the times thus the automation

Take another look. You can set any time for a reminder.

I need it based on sunrise and sunset which varies every day , in reminders it’s asking specific time

As outlined in the posts above, you are setting it up via a shortcut using a calculation, not through the application user interface for reminders.

I got the impression from your first post you just needed a pointer on how it could be done. I think you are misunderstanding how everything fits together, so here is a worked example for one of the times. Have a go at extending it.

Once you have that, set up a Shortcuts automation to run daily at, for example 1 AM, that runs the shortcut you created.

That should then conform to the solution I outlined originally, and so think should satisfy your requirements.

Hope that helps.

Thank you let me give it a go

This is just awesome. , I can now set an automation to run the alarm also at this time

I really appreciate that you go out of your way and you have created the automation for me. Thank you very very much. That is very magnanimous of you and I am very grateful for your help. Thank you once again.

Done alarm also done

1 Like

Thanks a million to @sylumer and @test_reports test_reports. I have copied your scripts and created my own, so wanted to acknowledge that and credit you.

Question for @test_reports, I did understand

  1. In the first command, you say Run…Start. In the 3rd command you say Run…End. How do I get the ‘Start’ and ‘End’ and what is the impact of either having or not having them.

  2. Why do you need the 4th command…it seems it is a duplicate of the first command.

FYI…my script is as below. I ran it successfully this morning without the above.

Thanks again.

They are not running the “Brahma Mubarak” shortcut with “Start” and “End”. They are running two entirely different shortcuts “Brahma Mubarak Start” and “Brahma Mubarak End”.

Based on the request and the structure of this shortcut, I assume each is generating results to be used in setting the two alarms. I would assume 38 minutes before sunrise, and 25 minutes before sunrise respectively. I’m not familiar with the practices, but I assume the aim is to begin 38 minutes before sunrise, and to finish 13 minutes later.

Looking at your shortcut, I assume you are just setting a start time alarm and no end time alarm.

I don’t know why the final ‘stop shortcut’ action in the earlier shortcut would be necessary as it is at the end of the shortcut where it would stop anyway.

1 Like

Have been away

Brahma muharat starts 96 minutes before sunrise and ends 48 minutes before sunrise

I always put end so that the automation has a direct instruction to stop

Yes that is true. I have two automations one for start and one for end