asp.net mvc 4 - How to send email on specific date using quartz.net -
i creating birthday app in asp.net mvc in want send reminder email user. using quartz.net purpose have no idea how send email on specific date (that user enter in textbox)
here code:
public static void start() { ischeduler scheduler = stdschedulerfactory.getdefaultscheduler(); scheduler.start(); ijobdetail job = jobbuilder.create<logincontroller>() .withidentity("emailreminder", "group1") .build(); itrigger trigger = triggerbuilder.create() .withidentity("emailreminder", "group1") .startat(//how value here?) .withsimpleschedule( x => x .withintervalinhours(1) .repeatforever()) .build(); scheduler.schedulejob(job, trigger);
i there startat() function job how can value enter user , pass value in startat() function ?
this should launch possible:
datetime utctime = datetime.specifykind(datetime.utcnow, datetimekind.utc); datetimeoffset targettime = new datetimeoffset(utctime); ... .startat(targettime) ...
you have replace utctime date user.
Comments
Post a Comment