A quartz planner is the right tool for the job. For some reason, almost all tutorials are focused on defining tasks at startup, in XML - while Quartz is fully capable of (re) scheduling tasks at run time.
You can and should use Spring to run the Quartz Scheduler, but then you can interact with it directly from your code. Here is a simple example from the documentation :
JobDetail job = newJob(SimpleJob.class)
.withIdentity("job1", "group1")
.build();
CronTrigger trigger = newTrigger()
.withIdentity("trigger1", "group1")
.withSchedule(cronSchedule("0/20 * * * * ?"))
.build();
scheduler.scheduleJob(job, trigger);
( Java ), ( , CRON) , . Spring. Spring .