From 814883b7c21bc747f7269f52d696c34ef31ee01a Mon Sep 17 00:00:00 2001 From: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Date: Fri, 9 May 2025 18:46:02 +0100 Subject: [PATCH] watchexec: add example (#16415) --- pages/common/watchexec.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/watchexec.md b/pages/common/watchexec.md index 3732a54393..821def1c9b 100644 --- a/pages/common/watchexec.md +++ b/pages/common/watchexec.md @@ -18,3 +18,7 @@ - Call/restart `my_server` when any file in the current directory changes, sending `SIGKILL` to stop the child process: `watchexec {{[-r|--restart]}} --stop-signal {{SIGKILL}} {{my_server}}` + +- Restart the execution of a command when any Java source file in the current directory changes, sending `SIGKILL` and only checking for updates every `n`ms: + +`watchexec {{[-r|--restart]}} --stop-signal {{SIGKILL}} --poll {{10000}} {{[-e|--exts]}} {{java}} {{command}}`