Let's say I have a customer who's account is set to expire on a given date. I have a task coded that will decommission the service but I'm not sure how to kick off the task exactly on the specified date.
I'm looking for a way to schedule a one-time future task with the following requirements:
- The task must be kicked off once, at exactly the time specified.
- The scheduling mechanism should be persistent. If the server goes down, the list of tasks should recover and kick off any that elapsed during the outage.
Since I'm using Java, Quartz seems like a reasonable option, but I've only used it for cron-based scheduling. I'm not sure if it could used for something like this or what the best practices are - especially with the persistence portion.
Does Spring have anything in this area?