Spring boot uses quartz for scheduled tasks. What to do when the quartz task dies?

problem background: use in microservices; enable a separate quartz module and use quartz for scheduled tasks;
other modules register job tasks with quartz, and execute them by quartz modules;

problem: when the quartz module dies, restart the quartz module, and other modules also restart and re-register the timing task;

Q: is there any good solution so that the quartz module does not need to re-register scheduled tasks after restarting?

Sep.16,2021

can persist scheduled tasks to the database


it is said that http://www.webcrontab.net can execute web tasks regularly is quite stable, I think it should be able to solve many website timing problems.


scenario 1: persist to the database
scenario 2: set different error mechanisms (misfir)


quartz can persist the configuration to the database so that multiple systems use the same configuration.
springboot2 integrates quartz, and can be easily configured. Please refer to

.

https://github.com/wangkeshan.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaca05-20ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaca05-20ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?