Configuration¶
schedr reads one configuration file and/or environment variables.
Environment variables mirror the configuration file’s structure, under the prefix
SCHEDR_CONFIG__(e.g. akeyin sectionsection→SCHEDR_CONFIG__SECTION__KEY).File format: TOML.
The file is found via the
--config <path>flag, then theSCHEDR_CONFIG_FILEenvironment variable (both: the file must exist), then the default location/etc/schedr/config.toml(read if it exists; otherwise defaults and environment only).Unknown keys are an error, and every error names the key and where its value came from (the file, e.g.
SCHEDR_CONFIG__OPS__PORT,SCHEDR_DAG_PATH, or a flag). In the file a path list is an array; in an environment variable a colon-separated string. Setting an alias and its full variable at once (SCHEDR_DAG_PATHandSCHEDR_CONFIG__DAGS__PATH) is an error.Built-in interpreter: if
[interpreters]doesn’t definepython, schedr looks for apython3, so a freshpip install schedrworks without configuration, even from a venv that isn’t activated (1.16). First match wins:an active virtualenv:
$VIRTUAL_ENV/bin/python3(source .venv/bin/activate,pyenv activate);a project venv:
.venv/bin/python3, thenvenv/bin/python3, in the current directory, then its parents (nearest first), as uv and Poetry find a project’s venv;next to the binary:
python3in the directory of the runningschedr(symlinks toschedrresolved): the venv’s own Python for a wheel installed into a venv;python3onPATH; when it is a pyenv shim (in$(pyenv root)/shims), it is resolved once at startup withpyenv which python3, in the user’s environment and directory (PYENV_VERSION,.python-version), and the real interpreter is used from then on: tasks get a clean environment and run in their root’s directory, where the shim could pick another Python, and starting every task through it costs time. A shim pyenv can’t resolve is a startup error with pyenv’s message.
Nothing found leaves plain
python3to the system. The python path is used as found, never resolved (a venv’spython3is a symlink, and only through the venv path does Python know its venv). Steps 1 and 2 depend on the user’s shell and directory, so only the local commands use them (standalone,dags check,dags test); aworker(M2) will use the configuration, step 3 and step 4, so a stray.venvin a pod’s directory can’t change its Python. The interpreter chosen and how is logged at startup, and named in the error when the runner can’t start (with the runner’s last output lines and what it needs: Python 3.14+ with this version ofschedr). Not chosen: apythonfallback (venvs always havepython3); readingpyproject.toml/uv.lock(.venvcovers uv and Poetry); conda (an active environment is onPATH, step 4); resolving the venv’s python symlink (breaks venvs).Precedence: command-line flags > environment variables > configuration file.
SCHEDR_DAG_PATHis a normal configuration key (SCHEDR_CONFIG__DAGS__PATH);SCHEDR_DAG_PATHis kept as a short alias.Secrets (database password, signing keys, …) come only from environment variables (filled from Kubernetes Secrets), never from the configuration file. The database URL is
[database] url/SCHEDR_CONFIG__DATABASE__URL; a URL with a password in the file is a startup error.Outgoing HTTP and proxies: schedr’s own outgoing HTTP calls (notification webhooks from the master; Vault from the agent, if outside the cluster) honour
HTTPS_PROXY,HTTP_PROXYandNO_PROXY. Internal links never use a proxy (gRPC between master and workers, the webserver’s calls to the workers’ log endpoints), whatever the environment says. Documented for deployments:NO_PROXYwith the cluster’s service domains (.svc,.cluster.local) and internal services; with Istio’sREGISTRY_ONLYoutbound policy,ServiceEntryresources for outside hosts. Tasks get the proxy variables only via[worker] pass_env.