Hi guys,
We have a requirement that regarding schedule task, and found there is a Job Module seems to available for JIRA application, is it correct?
And furthermore we plan to configure schedule job parameters on the Customized UI but not in the atlassian-plugin.xml file, is it possible?
Any thread is appreciates.
Thanks in advance.
Hello,
If you're writing your own plugin, it is possible. You can change scheduled task's parameters via UI.
Assume you have MyScheduledTask
public class MyScheduledTask implements JobRunner{
String parameter = "DEFAULT_VALUE";
public void register() {
parameter = getStoredParameter();
/* do something.... */
schedulerService.registerJobRunner(...);
schedulerService.scheduleJob(...);
}
public void unregister() {
schedulerService.unregisterJobRunner(...);
}
public JobRunnerResponse runJob(JobRunnerRequest request) {
/* do something */
}
}
From your UI,
- save stored parameter, scheduled task will read the value via getStroredParameter()
- call scheduled task's unregister and register methods in order.
It should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.