spring - Using java I need to send Notification Message, by calculating time automatically everyday at 5AM -


i need send notification messages registered customers, using mail service need send mail everyday @ 5am calculating time automatically. have mail service code completely. how execute 1 job @ specified time everyday.

you can use spring scheduler:

@scheduler(cron="0 0 5 * * *") public void emailjob() {   // code } 

also need annotation on class level: @enablescheduling


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -