c# - Call an MVC ActionResult with Quartz -


i'm trying set quartz stream values client using sses (server sent events). i'd call actionresult in controller every 5 seconds, send updated value client. have quartz set trigger execute() method of mtgoxtickerjob, class derived ijob. i'm unable call actionresult way, because mtgoxtickerjob outside of controller's context (there seem ways of doing it, ugly workarounds). there way set mvc actionresult job triggered quartz scheduler?

 //quartz scheduler          // construct scheduler factory         ischedulerfactory schedfact = new stdschedulerfactory();         // scheduler         ischeduler sched = schedfact.getscheduler();           ijobdetail jobdetail = jobbuilder.create<mtgoxtickerjob>()         .withidentity("testjob")         .build();         itrigger trigger = triggerbuilder.create()             .forjob(jobdetail)             .withcronschedule("0/5 * * * * ?")             .withidentity("testtrigger")             .startnow()             .build();         sched.schedulejob(jobdetail, trigger);         sched.start(); 

how making call action using regular http client? in end, if it's returning actionresult should make http call it.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -