Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedules don't work well with time zones #2209

Open
1 task done
strickvl opened this issue Jan 3, 2024 · 4 comments
Open
1 task done

Schedules don't work well with time zones #2209

strickvl opened this issue Jan 3, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@strickvl
Copy link
Contributor

strickvl commented Jan 3, 2024

Open Source Contributors Welcomed!

Please comment below if you would like to work on this issue!

Contact Details [Optional]

support@zenml.io

What happened?

There is an issue with Schedules not aligning properly with different time zones. When a pipeline is scheduled with a certain cron expression, it does not run at the expected local time due to time zone differences. For instance, a pipeline scheduled with the cron expression 0 9 * * * actually ran at 11 AM instead of the expected 9 AM.

Reproduction steps

This issue can be reproduced by setting up a pipeline with a specific cron expression and observing the time it actually runs, which differs due to the time zone. Here's an example:

from zenml.config.schedule import Schedule
from zenml.pipelines import pipeline

@pipeline
def my_pipeline(...):
    ...

schedule = Schedule(cron_expression="0 9 * * *")
my_pipeline = my_pipeline.with_options(schedule=schedule)
my_pipeline.run()

Expected behavior

The scheduled pipelines should run according to the local time zone of the user or the server where ZenML is running, or there should be clear documentation and warning messages indicating the time zone in which the schedules are interpreted.

Potential Solutions

Implement a technical solution that adjusts the scheduling time based on the user's or server's local time zone.
Provide a warning or error message in the ZenML interface to indicate the time zone used for scheduling.
Add documentation specifying the behavior of the scheduler with regards to time zones, especially if it runs on UTC time by default.

Additional context

This issue is crucial for users who rely on precise scheduling for their pipelines, particularly in a global context where users may be in different time zones.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@strickvl strickvl added enhancement New feature or request good first issue Good for newcomers labels Jan 3, 2024
@strickvl strickvl changed the title [FEATURE]: Schedules don't work well with time zones Schedules don't work well with time zones Jan 3, 2024
@ashutosh887
Copy link

@strickvl

I would like to work on this Issue!
Please assign...

@strickvl
Copy link
Contributor Author

@ashutosh887 you're welcome to do so. Might be worth picking one of the two you mentioned and starting with that one first, but go for it! Let us know if you have any questions or to propose how you might tackle the issue (once you've dived into it a bit).

@kartikbhtt7
Copy link

is anyone working on this issue?
I would like to work on it

@kartikbhtt7 kartikbhtt7 removed their assignment Apr 11, 2024
@shivanjay-wagh
Copy link

if this is still open, i would like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants