Duansg opened a new pull request, #4159:
URL: https://github.com/apache/hertzbeat/pull/4159

   ## What's changed?
   
   close #4157 
   
   Fixed an issue where monitoring tasks scheduled by cron would revert to 
fixed-interval scheduling. Due to parameter copying issues in the build paths 
of some tasks, the TimerDispatcher never entered the cron branch—cron would 
only function properly after editing the monitor. This issue also occurred 
during creation, restart, and when the collector reconnected.
   
   
   ## Modification details                                                      
                                                                                
                                      
    Copy `scheduleType` / `cronExpression` in every path that builds a 
**cyclic** job:
    - restart: `SchedulerInit.run()` .
    - create: `MonitorServiceImpl.addMonitor()`.
    - template update:`MonitorServiceImpl.updateAppCollectJob()`.
    - collector online: `CollectorJobScheduler.collectorGoOnline()`.
    - One-time detection paths (`cyclic = false`) are left unchanged.
   
   ## Checklist
   
   - [x]  I have read the [Contributing 
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
   - [ ]  I have written the necessary doc or comment.
   - [x]  I have added the necessary unit tests and all cases have passed.
   
   ## Add or update API
   
   - [ ] I have added the necessary [e2e 
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have 
passed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to