Ability to use timezones when using quartz component and CronJob strategy #5121
Labels
good first issue
Does not require full understanding of the codebase
kind/feature
New feature or request
Milestone
Requirement
Consider the scenario where I set up an Integration with the following endpoint:
from("quartz://groupName/timerName?cron=* 10-12 * * *&trigger.timeZone=America/Sao_Paulo")
This is supposed to run everyday from 10am to noon on Sao Paulo timezone.
As I create the integration in my cluster, it will create a CronJob with the 10-12 schedule. However, CronJobs run on the k8s node timezone, which in my case is UTC. So the integration would run with a 3-hour offset.
Problem
I would like to have my end users select the timezone they wish to run theirs jobs on, but with the limitation I will either force them to use UTC, or configure my cron trait with
fallback: true
to support timezone.Using
fallback: true
, however, keeps the integration pod running all the time, which may waste resources.Proposal
Since Kubernetes 1.27, CronJobs support timezone configuration in their spec, so I think we can extract that info from the quartz endpoint and use it to build the CronJob.
Open questions
No response
The text was updated successfully, but these errors were encountered: