Container Lifecycle

How Trustgrid containers start, stop, restart, and run on a schedule.

A container’s Execution Type controls when and how often it runs. Pick the one that matches the workload.

Execution types

Service

The container runs continuously and is kept running.

  • Starts automatically when the appliance comes up.
  • If the container exits — clean or not — it’s restarted automatically. A container with a config problem that exits immediately will keep being restarted; to break the cycle, set Status to Disabled while you fix it, or switch Execution Type to On Demand for debugging.
  • A Health Check reports the container as healthy or unhealthy in the portal. Restarts are driven by the container exiting; the health-check result is reporting only.
  • Use for: web services, background agents, anything that should always be up.

Recurring

The container runs on a schedule, like a cron job.

  • The Schedule field accepts either a simple rate or a cron expression.
  • Each run is independent — a fresh container starts, runs to completion, then waits for the next time.
  • If a previous run is still going when the next one is due, the next run is skipped.
  • Use for: scheduled batch jobs, periodic data pulls, cleanup scripts, reports.
RateDescription
rate(30 minutes)Run every 30 minutes
rate(1 hour)Run every hour
rate(1 day)Run once a day

For cron expressions, crontab.guru is a useful reference.

On Demand

The container only runs when you start it manually from the portal.

  • Does not start with the appliance.
  • Does not restart after it stops.
  • Use for: diagnostic tools, one-time tasks, testing a new container before switching it to Service.

Status vs. State

The container list shows two columns that look similar but mean different things:

  • Status — whether the container is configured to run. Enabled means it will be run; Disabled means it will be left alone.
  • State — what’s actually happening right now, such as Running or Stopped.

Common combinations:

StatusStateWhat’s going on
EnabledRunningHealthy — a Service container that’s up.
EnabledStoppedConfigured to run but isn’t running right now - for example, after a final failure, after a manual stop, or because it was unable to start.
DisabledStoppedConfigured but won’t be run. Useful when you’re staging changes.

Manual Start and Stop

Each container has Start and Stop buttons on its detail page at node scope:

  • Stop halts the container. There’s a wait of up to Stop Time (default 30 seconds) for a clean shutdown before it’s forced.
  • Start launches the container. For an On Demand container this is the only way to run it. For Service or Recurring containers, Start is useful when you want to run it immediately rather than waiting for the next scheduled run.

For a Service container, a manual Stop keeps it stopped until something in the config changes or you start it again manually. Normal config reconciliation does not restart an unchanged, enabled service that you stopped by hand.

See Container Tools for the full set of per-container actions.