Skip to content

Business days #183

@m-aciek

Description

@m-aciek

Would it make sense to extend the syntax with business days support? It would need to operate in a context of a concrete business days calendar.

iter = croniter('2 4 * * b', base)  # 04:02 on every business day
iter = croniter('0 0 * * b#1,b#2', base)  # 1st business day, and 2nd business day of the month
iter = croniter('0 0 * * b#3,Lb', base)  # 3rd and last business day of the month

The part that would be practical and doesn't have an expression (is it possible to compose it in?) is first/last/n-th business day in a week. Maybe for that we could use a second symbol e.g. bw meaning “business day in a week”?

iter = croniter('2 4 * * bw', base)  # 04:02 on every business day
iter = croniter('0 0 * * bw#1,bw#2', base)  # 1st business day, and 2nd business day of the week
iter = croniter('0 0 * * bw#3,Lbw', base)  # 3rd and last business day of the week

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions