Lyalpha opened a new issue #13701:
URL: https://github.com/apache/airflow/issues/13701


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Description**
   
   Alongside existing `@daily` etc. preset cron configurations, a new suite of 
`schedule_interval` options would exist to cause a dag to be scheduled each day 
to coincide with a solar based event, e.g. `@sunset`, `@dusk_nautical`. 
   <!-- A short description of your feature -->
   
   **Use case / motivation**
   
   Some workflows are diurnal or nocturnal by nature, an example is processing 
astronomical data. Particularly when far from the equator a single time per day 
can be significantly off from these solar events. These event-based schedules 
would prevent a long wait inside a task as a workaround.
   
   The scheduler would be able to calculate when the next event matching the 
`schedule_interval` will occur and update the time a dag will be scheduled that 
day as such. 
   
   An example implementation is shown by vanilla Celery [solar 
schedule](https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#solar-schedules).
 Will require:
   
   * External dependency (e.g. 
[skyfield](https://github.com/skyfielders/python-skyfield)) required to 
calculate the times of events
   * Some means of setting a latitude/longitude in configuration to fix the 
solar events for a position on Earth
   
   <!-- What do you want to happen?
   
   Rather than telling us how you might implement this solution, try to take a
   step back and describe what you are trying to achieve.
   
   -->
   
   **Are you willing to submit a PR?**
   
   In the future, hopefully. It is unlikely to warrant entry into core airflow.
   <!--- We accept contributions! -->
   
   **Related Issues**
   
   <!-- Is there currently another issue associated with this? -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to