Uploaded image for project: '{RETIRED} XWiki Scheduler Application'
  1. {RETIRED} XWiki Scheduler Application
  2. XASCH-57

Scheduler does not save jobs status properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 1.21
    • 1.20
    • Plugin
    • None

    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).

      Attachments

        Activity

          People

            jerome Jerome Velociter
            jerome Jerome Velociter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: