For cost optimization with per-minute billing, you can enable one-shot mode by checking the "One-shot mode" checkbox in the Slave Template configuration. In this mode:
- The agent is marked offline immediately to prevent new jobs from being assigned.
- The droplet is destroyed as soon as the current job completes and the agent becomes idle.
- This ensures each droplet runs exactly one job and terminates immediately afterward.
Note: The idle status is checked every 60 seconds, so termination may occur up to 60 seconds after the job finishes.
For faster termination when idle (without one-shot mode), set idleTerminationInMinutes to a negative value like -1. This terminates idle agents immediately, checked every 6 seconds.