From b45ac7612e49ed009d0a56252eacf0d721bfbe09 Mon Sep 17 00:00:00 2001 From: Lars Uffmann Date: Sat, 11 Nov 2023 09:05:06 +0100 Subject: [PATCH 1/2] Add a Restarting a stopped or failed Job section to the batch howto --- .../src/docs/asciidoc/anchor-rewrite.properties | 1 + .../spring-boot-docs/src/docs/asciidoc/howto/batch.adoc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties index 75d2e96cda45..2bb711997ed8 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties @@ -663,6 +663,7 @@ howto-batch-applications=howto.batch howto-spring-batch-specifying-a-data-source=howto.batch.specifying-a-data-source howto-spring-batch-running-jobs-on-startup=howto.batch.running-jobs-on-startup howto-spring-batch-running-command-line=howto.batch.running-from-the-command-line +howto-spring-batch-restarting-a-failed-job=howto.batch.restarting-a-failed-job howto-spring-batch-storing-job-repository=howto.batch.storing-job-repository howto-actuator=howto.actuator howto-change-the-http-port-or-address-of-the-actuator-endpoints=howto.actuator.change-http-port-or-address diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/batch.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/batch.adoc index f2113a069745..324c3199de09 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/batch.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/batch.adoc @@ -53,7 +53,12 @@ Consider the following command: This provides only one argument to the batch job: `someParameter=someValue`. +[[howto.batch.restarting-a-failed-job]] +=== Restarting a stopped or failed Job +In order to restart a failed `Job`, all parameters (identifying and non-identifying) have to be re-specified on the command line. Non-identifying parameters are *not* copied from the previous execution. This allows them to be modified or removed. + +NOTE: When using a custom `JobParametersIncrementer`: Be prepared to gather all parameters managed by the incrementer in order to restart a failed execution. [[howto.batch.storing-job-repository]] === Storing the Job Repository From 11b92df655a93b28b8021d3d54151d161f57e5d1 Mon Sep 17 00:00:00 2001 From: Lars Uffmann Date: Mon, 13 Nov 2023 09:19:41 +0100 Subject: [PATCH 2/2] Revert anchor-rewrite for batch-restart section --- .../spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties index 2bb711997ed8..75d2e96cda45 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/anchor-rewrite.properties @@ -663,7 +663,6 @@ howto-batch-applications=howto.batch howto-spring-batch-specifying-a-data-source=howto.batch.specifying-a-data-source howto-spring-batch-running-jobs-on-startup=howto.batch.running-jobs-on-startup howto-spring-batch-running-command-line=howto.batch.running-from-the-command-line -howto-spring-batch-restarting-a-failed-job=howto.batch.restarting-a-failed-job howto-spring-batch-storing-job-repository=howto.batch.storing-job-repository howto-actuator=howto.actuator howto-change-the-http-port-or-address-of-the-actuator-endpoints=howto.actuator.change-http-port-or-address