Skip to content

Support # in DAPR Cron binding #121

@chodankarcc

Description

@chodankarcc

Expected Behavior

Allow DAPR cron binding to support # character which can be used to schedule in scenario like execute 2nd Tuesday of month at 7am. Cron expression for same is "0 7 ? * 2#2" so it can be executed as per requirement.

Actual Behavior

Currently it fails with below error:
(bindings.cron/v1): invalid schedule format 'CRON_TZ=America/Chicago 0 7 ? * 2#2': failed to parse int from 2#2: strconv.Atoi: parsing "2#2": invalid syntax failed to load declarative subscriptions: rpc error: code = Canceled desc = context canceled failed to connect to scheduler host: failed to watch scheduler hosts: rpc error: code = Canceled desc = received context error while waiting for new LB policy update: context canceled

Steps to Reproduce the Problem

Add Cron binding component like below:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: -cron
namespace:
spec:
type: bindings.cron
version: v1
metadata:

  • name: schedule
    value: "CRON_TZ=America/Chicago 0 7 ? * 2#2"
  • name: route
    value:

Release Note

RELEASE NOTE:

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