Description
The way the scheduler saves job status is wrong, and used to work only because of a bug in XWiki core that has been fixed in 2.5 M1 :
private void saveStatus(String status, BaseObject object, XWikiContext context) throws XWikiException { XWikiDocument jobHolder = context.getWiki().getDocument(object.getName(), context); object.setStringValue("status", status); jobHolder.setMinorEdit(true); context.getWiki().saveDocument(jobHolder, context); }
When using scheduler plugin with a core version > 2.5 the symptoms are :
- Job states are not saved, so not restored properly after a server restart. For example a paused job will restart in its state before it was pause.
- Newly created jobs (for example watchlist jobs when creating a new wiki) will always have "None" as status in the UI, and their next fire time will be displayed as N/A (although the job is actually really scheduled against quartz).