kit icon indicating copy to clipboard operation
kit copied to clipboard

Support # in DAPR Cron binding

Open chodankarcc opened this issue 9 months ago • 0 comments

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:

chodankarcc avatar May 12 '25 20:05 chodankarcc