Skip to content

Update cron library to support time zones in cron schedules #6445

@kotcrab

Description

@kotcrab

Is your feature request related to a problem? Please describe.
Some workflows need to run at specific local time as they are related to other business processes. Right now the cron schedule can only be specified in the UTC time zone. This is a problem in countries using DST. We had a time zone change recently and our scheduled workflows started 1 hour earlier than expected. It would be great if time zone could be specified in the cron schedule.

Proposed Solution
It should be enough to update robfig/cron from v1.2.0 to v3.x.x. The new version of the library supports CRON_TZ param and then the schedule can be defined as for example: CRON_TZ=America/New_York 5 4 * * *.

It looks like simple, backwards compatible upgrade, Temporal implemented this in temporalio/temporal#2215.
Seems like tzdata also needs to be added, this was done in temporalio/temporal#2277.

Metadata

Metadata

Assignees

No one assigned

    Labels

    customerFeature asks from customerup-for-grabsIssues that are good entry points for those new to Cadence that want to contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions