-
Notifications
You must be signed in to change notification settings - Fork 18
introduce timezone for CRON #260
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: fiedlerNr9 <[email protected]>
Signed-off-by: fiedlerNr9 <[email protected]>
a42d72d
to
244eacd
Compare
|
||
@property | ||
def timezone_expression(self) -> str: | ||
return f"{self.timezone} {self.expression}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it must be
return f"{self.timezone} {self.expression}" | |
return f"CRON_TZ={self.timezone} {self.expression}" |
for example:
CRON_TZ=America/Chicago * * * * *
""" | ||
|
||
expression: str | ||
timezone: Literal["America/Los_Angeles", "Europe/London", "Australia/Sydney", "America/New_York"] = DEFAULT_TIMEZONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be extended to all the timezones
|
||
import rich.repr | ||
|
||
DEFAULT_TIMEZONE = "America/Los_Angeles" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be utc - no time zone to preserve current behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah easy to default to UTC
Uh oh!
There was an error while loading. Please reload this page.