dapr / dapr/kit

Support # in DAPR Cron binding

Open
#121 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21
Forks
46
Avg merge
4d 3h
Merged PRs (30d)
2

Description

## 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:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.