Open DeskPlant opened 5 months ago
Got same problem with cron error
I am facing same problem
@gbartolini is that targeting in next release ?
May be this will help: https://pkg.go.dev/github.com/robfig/cron I used this doc to configure
May be this will help: https://pkg.go.dev/github.com/robfig/cron I used this doc to configure
thank you, will check and share update
The issue seems to be that CNPG uses a 6 string cron as defined on the link on the docs (https://pkg.go.dev/github.com/robfig/cron). However, the docs mention:
This field is a cron schedule specification, which follows the same format used in Kubernetes CronJobs
And when looking at k8s CronJob docs here It says that is a 5 digit string cron.
The .spec.schedule field is required. The value of that field follows the Cron syntax:
So the issue doesn't seem to be that is calculating it wrong, but rather that the docs/links/logic are inconsistent.
Is there an existing issue already for this bug?
I have read the troubleshooting guide
I am running a supported version of CloudNativePG
Contact Details
patrik.zotj@gmail.com
Version
1.22.2
What version of Kubernetes are you using?
1.29
What is your Kubernetes environment?
Cloud: Amazon EKS
How did you install the operator?
YAML manifest
What happened?
After creating a cluster, i tried attaching a scheduled backup resource to it using the yaml below.
The backups created by it are fine, the issue is the frequency of the backups does not match the given cron in the yaml file. For examle if i give it a cronjob to backup every day at 1 am, even though it says the schedule is correct when i use kubectl describe, the backups are instead done every 1 hour.
I have tried this with other formats for example every 8 hours and that makes the backups occur every 8 minutes instead.
Cluster resource
No response
Relevant log output
No response
Code of Conduct