-
What happens if an exception is thrown in a @scheduled method? Is the task stopped and all future invocations stopped too? I couldn't find an explanation in a scenario like that. There seems to be a FailedExecution event that is thrown. Can that be handled? If so, how? |
Beta Was this translation helpful? Give feedback.
Answered by
mkouba
Jul 10, 2023
Replies: 1 comment 1 reply
-
/cc @mkouba (scheduler) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nope, it is not stopped.
We log a message with level
ERROR
and the text that starts withError occurred while executing task for trigger...
.Furthermore, we fire the
FailedExecution
CDI event, both synchronously and asynchronously. You can observe these events and inspect the cause: