pinot icon indicating copy to clipboard operation
pinot copied to clipboard

Allow to use cron to schedule the controller periodical tasks

Open xiangfu0 opened this issue 1 year ago • 1 comments

Current cron job schedule is based on the controller start time, we should have a way to schedule it run at a given CRON setting.

xiangfu0 avatar Sep 22 '24 05:09 xiangfu0

Can we do this by creating another execute type function in CronJobScheduleJob.java that takes in the job execution context and an added field for the CRON job start time? Just want to make sure I'm understanding the feature correctly.

ashishjayamohan avatar Sep 24 '24 17:09 ashishjayamohan

Hey there 👋 I'm looking for an issue to tackle but before diving into this one I'd like to clarify if I understand it correctly.

The change is needed for this class ControllerPeriodicTask, right?

  1. I see that when we initiate a controller periodic task we use ControllerConf and pass a STATUS_CHECKER_INITIAL_DELAY_IN_SECONDS.
  2. The idea is to create an additional field in ControllerConf for a CRON configuration and parse it into STATUS_CHECKER_INITIAL_DELAY_IN_SECONDS, right?
  3. Would you suggest using an external library to parse CRON expression, like this one https://github.com/jmrozanec/cron-utils, or implementing the parsing manually?

DaniilRoman avatar Jan 19 '25 21:01 DaniilRoman