Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ start-email-scheduler=true
cron-scheduler-email=0 0/1 * * * ? *

###cti data check with call detail report Scheduler
#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *

start-ctidatacheck-scheduler=@env.START_CTIDATACHECK_SCHEDULER@
cron-scheduler-ctidatacheck=0 00 02 * * *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
start-ctidatasync-scheduler=@env.START_CTIDATASYNC_SCHEDULER@
cron-scheduler-ctidatasync=0 30 01 * * ? *
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
start-nhmdashboard-scheduler=@env.START_NHMDASHBOARD_SCHEDULER@
cron-scheduler-nhmdashboard=0 30 0 * * ? *
### generate Beneficiary Config
genben-api= @env.BEN_GEN_API_URL@

Expand Down Expand Up @@ -170,7 +174,7 @@ springdoc.swagger-ui.enabled=false
isProduction=@env.IS_PRODUCTION@
grievanceAllocationRetryConfiguration=3

start-grievancedatasync-scheduler=true
start-grievancedatasync-scheduler=@env.START_GRIEVANCEDATASYNC_SCHEDULER@
cron-scheduler-grievancedatasync=0 0/2 * * * ?

captcha.secret-key=@env.CAPTCHA_SECRET_KEY@
Expand Down
13 changes: 9 additions & 4 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ cron-scheduler-email=0 0/1 * * * ? *

###cti data check with call detail report Scheduler
#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *

start-ctidatacheck-scheduler=${START_CTIDATACHECK_SCHEDULER}
cron-scheduler-ctidatacheck=0 00 02 * * *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------
start-ctidatasync-scheduler=${START_CTIDATASYNC_SCHEDULER}
cron-scheduler-ctidatasync=0 30 01 * * ? *
##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
start-nhmdashboard-scheduler=${START_NHMDASHBOARD_SCHEDULER}
cron-scheduler-nhmdashboard=0 30 0 * * ? *
Comment on lines +60 to +65
Copy link
Contributor

@coderabbitai coderabbitai bot Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent / non-portable Quartz-style cron (7 fields, β€œ?”) mixed with Spring cron (6 fields, β€œ*”)

cron-scheduler-ctidatasync and cron-scheduler-nhmdashboard use
0 30 01 * * ? * and 0 30 0 * * ? * (7 fields + β€œ?”).
cron-scheduler-ctidatacheck uses a 6-field Spring expression 0 00 02 * * *.

If your codebase relies on org.springframework.scheduling.support.CronTrigger prior to Spring 5.3, the β€œ?” character and 7-field syntax will raise IllegalArgumentException: Cron expression must consist of 6 fields.
Align on one style:

-cron-scheduler-ctidatasync=0 30 01 * * ? *
-cron-scheduler-nhmdashboard=0 30 0 * * ? *
+cron-scheduler-ctidatasync=0 30 01 * * *
+cron-scheduler-nhmdashboard=0 30 00 * * *

Or, if Quartz is intentionally used everywhere, convert the 6-field expression to 7-field Quartz for consistency (0 00 02 * * ? *).

Validate against the actual scheduler implementation before merging.

πŸ€– Prompt for AI Agents
In src/main/environment/common_docker.properties around lines 60 to 65, the cron
expressions mix Quartz-style 7-field syntax with "?" and Spring-style 6-field
syntax, causing potential IllegalArgumentException in Spring versions before
5.3. To fix this, standardize all cron expressions to use either 6-field Spring
syntax or 7-field Quartz syntax consistently. If Quartz is used, convert the
6-field expression to 7-field by adding the missing field and replacing "*" with
"?" where appropriate. Validate the final cron expressions against the scheduler
implementation before merging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vanitha1822 can you opine on this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

### generate Beneficiary Config
genben-api= ${BEN_GEN_API_URL}

Expand Down Expand Up @@ -171,7 +176,7 @@ springdoc.swagger-ui.enabled=false
isProduction=${IS_PRODUCTION}
grievanceAllocationRetryConfiguration=3

start-grievancedatasync-scheduler=false
start-grievancedatasync-scheduler=${START_GRIEVANCEDATASYNC_SCHEDULER}
cron-scheduler-grievancedatasync=0 0/2 * * * ?

captcha.secret-key=${CAPTCHA_SECRET_KEY}
Expand Down
6 changes: 3 additions & 3 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ cron-scheduler-email=0 0/1 * * * ? *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------

start-ctidatasync-scheduler=false
cron-scheduler-ctidatasync=0 0 2 */2 * ?
cron-scheduler-ctidatasync=0 30 01 * * ? *

##-------------------------------###cti data check with call detail report Scheduler------------------------------------------------------

#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *
start-ctidatacheck-scheduler=false
cron-scheduler-ctidatacheck=0 00 02 * * *

##---------------------------------#### Registration schedular for Avni------------------------------------------------------------------------------

Expand Down
Loading