You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core_concepts/9_worker_groups/index.mdx
+22-14Lines changed: 22 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Examples of configurations include:
46
46
47
47
1.[Assign different jobs to specific worker groups](#set-tags-to-assign-specific-queues) by giving them tags.
48
48
2.[Set an init script](#init-scripts) that will run at the start of the workers (e.g. to pre-install binaries).
49
-
3.[Set a worker script](#worker-scripts) that will run at regular intervals on workers (e.g. for maintenance tasks).
49
+
3.[Set a periodic script](#worker-scripts) that will run at regular intervals on workers (e.g. for maintenance tasks).
50
50
4.[Dedicate your worker to a specific script or flow](#dedicated-workers--high-throughput) for high throughput.
51
51
52
52
## Assign custom worker groups
@@ -275,9 +275,10 @@ Examples of configurations include:
275
275
276
276
1. [Assign different jobs to specific worker groups](#set-tags-to-assign-specific-queues) by giving them tags.
277
277
2. [Set an init script](#init-scripts) that will run at the start of the workers (e.g. to pre-install binaries).
278
-
3. [Set a worker script](#worker-scripts) that will run at regular intervals on workers (e.g. for maintenance tasks).
278
+
3. [Set a periodic script](#worker-scripts) that will run at regular intervals on workers (e.g. for maintenance tasks).
279
279
4. [Dedicate your worker to a specific script or flow](#dedicated-workers--high-throughput) for high throughput.
280
280
281
+
281
282
## Alerts
282
283
283
284
You can set an alert to receive notification via Email, Slack, or Microsoft Teams when the number of running workers in a group falls below a given number. It's available in the worker group config.
@@ -340,30 +341,37 @@ Autoscaling is available in the [Enterprise plan](/pricing).
340
341
/>
341
342
</div>
342
343
343
-
## Init scripts
344
+
## Worker scripts
345
+
346
+
Worker scripts provide methods to run bash scripts on workers at different stages of the worker lifecycle. There are two types of worker scripts: init scripts that run once at worker startup, and periodic scripts that run at regular intervals for ongoing maintenance.
344
347
345
-
[Init scripts](../../advanced/8_preinstall_binaries/index.mdx#init-scripts) provide a method to pre-install binaries or set initial configurations without the need to modify the base image. This approach offers added convenience. Init scripts are executed at the beginning when the worker starts, ensuring that any necessary binaries or configurations are set up before the worker undertakes any other job.
348
+
Under the [Cloud plans & Self-Hosted Enterprise Edition](/pricing), both types of worker scripts can be configured from the Windmill UI in the worker group settings.
346
349
347
-
Under the [Cloud plans & Self-Hosted Enterprise Edition](/pricing), they can be set from Windmill UI.
350
+
When adjustments are made in the Worker Management UI, the workers will shut down and are expected to be restarted by their supervisor (Docker or k8s).
351
+
352
+
### Init scripts
353
+
354
+
[Init scripts](../../advanced/8_preinstall_binaries/index.mdx#init-scripts) provide a method to pre-install binaries or set initial configurations without the need to modify the base image. This approach offers added convenience. Init scripts are executed at the beginning when the worker starts, ensuring that any necessary binaries or configurations are set up before the worker undertakes any other job.
The execution of init scripts is inspectable in the superadmin workspace, with Kind = All filter. The path of those executions are `init_script_{worker_name}`.
368
+
369
+
### Periodic scripts
370
+
371
+
Periodic scripts are bash scripts that run at regular intervals on workers, designed for ongoing maintenance tasks that need to be executed repeatedly during the worker's lifetime, with the **minimum interval settable between periodic script executions being 60 seconds**.
372
+
373
+
374
+
The execution of periodic scripts is inspectable in the superadmin workspace, with Kind = All filter. The path of those executions are `periodic_script_{worker_name}_{timestamp}`.
0 commit comments