Is there any way to define say 4 functions in our job class (w开发者_JS百科hich implements the IJob
interface) and use them dynamically in quartz_jobs.xml file.
Right now the only way is to put business logic in the Execute
method. But I want to define my own methods and use that name in <job-type>
tag. Like say I defined 2 methods SendMail1()
and SendMail2()
and no execute method is there in my job class. Now I want to call it like:
<job-type>
ClassLibrary1.Class1.SendMail1, ClassLibrary1
</job-type>
Requirement is urgent. If anybody has any idea, please send it.
Thanks in advance, Akki J
Add additional methods to your class as you describe.
In your Execute method use one of your job data values to determine which other method to call.
精彩评论