From 6656b64bf9fc14cfa25c880836dcd402e165d98a Mon Sep 17 00:00:00 2001 From: Christian Specht Date: Wed, 20 Nov 2024 00:08:49 +0100 Subject: [PATCH] add note about restarting the runner service after changing the .env file --- .../running-scripts-before-or-after-a-job.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job.md b/content/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job.md index 9fd6434d4b7d..5e1a8e1812e3 100644 --- a/content/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job.md +++ b/content/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job.md @@ -58,6 +58,9 @@ ACTIONS_RUNNER_HOOK_JOB_STARTED=/opt/runner/cleanup_script.sh > [!NOTE] > The script defined in `ACTIONS_RUNNER_HOOK_JOB_COMPLETED` is executed at the end of the job, before the job completes. This makes it unsuitable for use cases that may interrupt a runner, such as deleting the runner machine as part of an autoscaling implementation. +> [!NOTE] +> If the runner application is running as a service, it reads the `.env` file only when the service starts. So after creating or editing the `.env` file, you need to stop and restart the service. + ## Troubleshooting ### Permission denied