Skip to content

Commit 93d4e39

Browse files
dieribarubenfiszel
andauthored
update docs: periodic init script (#1043)
* update * Update index.mdx * update * update --------- Co-authored-by: Ruben Fiszel <[email protected]>
1 parent 34e7135 commit 93d4e39

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

docs/core_concepts/9_worker_groups/index.mdx

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Examples of configurations include:
4646

4747
1. [Assign different jobs to specific worker groups](#set-tags-to-assign-specific-queues) by giving them tags.
4848
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).
5050
4. [Dedicate your worker to a specific script or flow](#dedicated-workers--high-throughput) for high throughput.
5151

5252
## Assign custom worker groups
@@ -275,9 +275,10 @@ Examples of configurations include:
275275
276276
1. [Assign different jobs to specific worker groups](#set-tags-to-assign-specific-queues) by giving them tags.
277277
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).
279279
4. [Dedicate your worker to a specific script or flow](#dedicated-workers--high-throughput) for high throughput.
280280
281+
281282
## Alerts
282283
283284
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).
340341
/>
341342
</div>
342343
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.
344347
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.
346349
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.
348355
349356
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%' }}>
350357
<img
351358
src={require('../../advanced/8_preinstall_binaries/init_scripts.png').default}
352-
alt="Init scripts Infographics"
353-
title="Init scripts Infographics"
359+
alt="Worker scripts Infographics"
360+
title="Worker scripts Infographics"
354361
width="70%"
355362
/>
356363
</div>
357364
358365
<br />
359366
360-
<div className="grid grid-cols-2 gap-6 mb-4">
361-
<DocCard
362-
title="Init scripts"
363-
description="Init scripts are executed at the beginning when the worker starts."
364-
href="/docs/advanced/preinstall_binaries#init-scripts"
365-
/>
366-
</div>
367+
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}`.
367375
368376
## Worker scripts
369377

0 commit comments

Comments
 (0)