mery
mery

Reputation: 1

schedule notifications and emails based on date and time limit in spring

in my spring mvc application I need to notify users about their tasks and send them an email whenever the time limit is reached. How can I do that?

Upvotes: 0

Views: 2242

Answers (1)

dimitrisli
dimitrisli

Reputation: 21411

  1. Spring Scheduling Docs - Use @Scheduled(fixedDelay=..) for occasional lookups or @Scheduled(cron=..) for more intricate trigger
  2. The above scheduled operation will perform a DB lookup in a table where you have stored some timestamp. Then now - timestamp will be calculated to see whether it is breaching the configurable threshold
  3. In that case EmailService takes over for user email lookup and email send operations

Upvotes: 1

Related Questions