Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DaprJob Cron Expression Not Working #1453

Closed
ajaysingh77 opened this issue Feb 5, 2025 · 2 comments
Closed

DaprJob Cron Expression Not Working #1453

ajaysingh77 opened this issue Feb 5, 2025 · 2 comments
Labels
area/client/jobs kind/bug Something isn't working

Comments

@ajaysingh77
Copy link

Expected Behavior

Support all 6 fields of cron expression including second's part

Actual Behavior

getting error saying expecting only 5 fields instead of 6 fields.
RpcException: Status(StatusCode="Internal", Detail="failed to schedule job due to: rpc error: code = Unknown desc = job failed validation: expected exactly 5 fields, found 6: [/10 * * * ]")

Defining job without seconds part execute the code but looking the dapr scheduler logs showing the
" level=fatal msg="error running scheduler: expected exactly 6 fields, found 5: [/1 * * * *]"

Causing the "MapDaprScheduledJobHandler" never hit.

Steps to Reproduce the Problem

Try to create job by defining cron expression containing second's part for e.g.
"*/10 * * * * *"; // Every 10 Sec

I am currently using "1.15.0-rc03" version of Dapr.Jobs

@ajaysingh77 ajaysingh77 added the kind/bug Something isn't working label Feb 5, 2025
@WhitWaldo
Copy link
Contributor

@ajaysingh77 This is a known bug in the Dapr runtime, not the .NET SDK. While a patch was recently merged that fixes it, there hasn't been another RC of the runtime yet that it's available in.

Stay tuned!

@WhitWaldo
Copy link
Contributor

This is fixed in the Dapr runtime 1.15.0-rc11 - no Dapr .NET SDK changes needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client/jobs kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants