[xwiki/xwiki-platform] cb528a: XWIKI-15952: Update Scheduled Job With Job Re-Defi...
Branch: refs/heads/XWIKI-15952 Home: https://github.com/xwiki/xwiki-platform Commit: cb528a6ea711ab9859b9db4779b7d39832695d6a https://github.com/xwiki/xwiki-platform/commit/cb528a6ea711ab9859b9db4779b7d... Author: Vincent Massol <[email protected]> Date: 2026-08-26 (Wed, 26 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/src/main/java/com/xpn/xwiki/plugin/scheduler/SchedulerPlugin.java M xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-test/xwiki-platform-scheduler-test-docker/src/test/it/org/xwiki/scheduler/test/ui/SchedulerIT.java Log Message: ----------- XWIKI-15952: Update Scheduled Job With Job Re-Definition * Re-register a job that is already known to the scheduler when its definition changes, so that saving a job document is enough for the new definition to be used. The scheduler is given the job xobject when the job is registered and reads the script from that instance, so until now an edited script or cron expression kept being ignored until the job was unscheduled and scheduled again, or until XWiki was restarted. The job silently kept running its previous code, which is worse than failing. * Reuse reloadJob(), which already re-creates a job and puts it back in the state it was in. * Ignore a modification that only changes the status field, since the scheduler saves that field itself whenever it registers, pauses or unregisters a job, which would otherwise reload the job again in the middle of its own save. * Leave alone a job that the scheduler doesn't know about, so that saving an unscheduled job doesn't add a dormant job to the scheduler. Such a job is registered with its new definition when it gets scheduled. * Add an integration test scheduling a job that writes a known content, then modifying its script and triggering it again. It fails on the previous behaviour, on the second content only, which is the part the fix addresses. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications