Scheduling
Scheduling
Schedule
Defines when and how often Watchtower checks for new images using a 6-field Cron expression.
Example: --schedule "0 0 4 * * *" runs daily at 4 AM.
Argument: --schedule, -s
Environment Variable: WATCHTOWER_SCHEDULE
Type: String
Default: NoneInterval
Sets the interval (in seconds) for polling new images.
Argument: --interval, -i
Environment Variable: WATCHTOWER_POLL_INTERVAL
Type: Integer
Default: 86400 (24 hours)Cannot be used with
--schedule.
Overrides cron-based scheduling.Run Once
Triggers a single update attempt for specified containers and exits immediately.
Argument: --run-once, -R
Environment Variable: WATCHTOWER_RUN_ONCE
Type: Boolean
Default: falseWatchtower automatically sets its own restart policy to “no” in run-once mode to prevent unwanted restarts.
Time Zone
Sets the time zone for Watchtower’s logs and the --schedule flag’s cron expressions.
Argument: None
Environment Variable: TZ
Type: String
Default: UTC- To specify a time zone, use a value from the TZ Database (e.g.,
Europe/Rome). - Alternatively, mount the host’s
/etc/localtimefile using-v /etc/localtime:/etc/localtime:ro.
Update on Start
Performs an update check on startup. If a schedule is configured (via –schedule or –interval), then Watchtower continues with periodic updates.
Argument: --update-on-start
Environment Variable: WATCHTOWER_UPDATE_ON_START
Type: Boolean
Default: falseHTTP API Periodic Polls
Enables periodic updates when the HTTP API update endpoint is active.
Argument: --http-api-periodic-polls
Environment Variable: WATCHTOWER_HTTP_API_PERIODIC_POLLS
Type: Boolean
Default: false- Requires the
updateendpoint to be enabled via thehttp-api-endpointsconfiguration option. - The deprecated
http-api-updateconfiguration option still works until Watchtower v2. (See Deprecated Configuration Options).
Last updated on