• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Schedule tasks based on user input

 
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I was wondering if anyone has any experience with task scheduling in Spring?
I understand you can schedule for a fixed time period or interval using annotations
https://spring.io/guides/gs/scheduling-tasks/
But I was wondering if anyone knows how to do this using dynamic user input at runtime.
For example a user schedules an email to be sent at 5:02pm exactly, is there a way add a new task dynamically using that as a time?

Thanks.

PS. I've been using this forum without an account for a while, and its a great resource, thanks to everyone who contributes!
 
R Stewart
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bump
 
R Stewart
Greenhorn
Posts: 9
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answered my own Question:

I created a bean as follows:


Then Added the following wherever needed:


Hope this might be useful to others!
 
Marshal
Posts: 27531
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definitely could be useful to others! I gave you a cow for posting the result of your research.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic