-
-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Hi there, first let me state that Dagu is a fantastic tool that has grown into a powerful cron replacement over time. I love the new web UI. Excellent work.
Now let me float an idea which derives from the fact that I have a few dags running and sunset, sundawn or other variable times related to the position of the sun. Currently I am helping myself with a quite messy solution outside of Dagu that checks if a certain condition like sunset for example is met. I really think that it would be better and more elegant to integrate such a thing into the scheduler directly.
I imagine something like you'd be able use @sunset
or @sundawn
in the schedule definition. Of course the exact time of these events would require calculating them for the day at midnight let's say. Furthermore you'd also require a location setting giving latitude and longitude of the exact location because of course the sun location depends on where you are on the globe.
It could look something like this in the dag definition:
schedule:
start: "@sunset"
location:
lat: 51.5108035053134
lon: -0.1591131444429184
The calculation of these sun data is pretty simple and straightforward. One could use something like "github.com/sixdouglas/suncalc" for example. I just don't know how these kind of variating schedule dates would integrate into Dagu.
Please let me know what you think. I'd totally understand if you'd think that it is unfeasible, useless or too complicated. I am just suggesting and it would be something that at least for me would be very interesting to have.
Thanks, keep up the great work. Thanks for Dagu.