Or, failing that, removing a task from the scheduler and adding a new one.
I'm afraid this is a part of Spring I'm more or less 100% ignorant on, and spending an afternoon reading articles about it hasn't elucidated things much.
Basically, I have a program with three scheduled tasks, one that runs every 500ms and two that run based on cron expressions. My customers want the ability to change those cron expressions on the fly.
Near as I can tell this means I need to take the cron expressions out of the application context and move them to the database. That part is easy. The hard part is figuring out how to get a reference to the already existing scheduled task in Spring and change when it is next supposed to run. Every article I've found on this subject just describes how to set up application context or annotations.
The only answer I've been able to find would only work for regular intervals (and, according to the comments, may not actually work). I'm hoping to not have to write something that interprets Cron expressions, so I'm considering that solution "plan B".
Thanks for any help!