java - Spring Boot : Getting @Scheduled cron value from database -
i'm using spring boot
, have issues scheduling cron task
using values existing in database.
for time being, i'm reading values properties file below :
@scheduled(cron= "${time.export.cron}") public void performjob() throws exception { // }
this works nicely, instead of getting values properties file, want them database table. possible , how ?
to achieve goals must configure scheduler @ runtime. means need use more low-level scheduler api. precisely when have prepared connect database can configure scheduler. think need rid of using @scheduled annotation , manully manage scheduler.
i think these topics can describe mean:
however can use wild approaches intercept bean creation , replace original annotation on annotation custom metadata in order implement must know many framework details , how @scheduled annatation processor works.
Comments
Post a Comment