The environment jobs inherit
Cronch reads your environment once, when it starts, and every job inherits it:- macOS — apps started at login normally get a stripped-down
PATH. So Cronch asks your login shell ($SHELL, usually zsh) for your real environment, the same way a new terminal window would: it runs it once as a login, interactive shell, which reads your startup files such as.zprofileand.zshrc— where Homebrew, nvm, pyenv and similar tools set themselves up. That’s whynode,pythonorgitare found in scheduled jobs too. - Windows — jobs inherit the environment Cronch itself was started with: your user and system environment variables. No shell startup files are involved.
Jobs run in a non-interactive shell, so your aliases and shell functions aren’t available, and PowerShell runs with
-NoProfile, so your PowerShell profile isn’t loaded. Call the real program, or put the logic in a script.Variables per rule
The editor’s Environment variables field adds variables for one rule — oneKEY=VALUE per line:
- They’re added on top of the inherited environment and override a variable with the same name.
- Values are taken literally:
$HOME,%USERPROFILE%or~inside a value are not expanded. - Spaces around a line are trimmed. A line without
=, or with nothing before the=, is ignored without a warning — check your spelling if a variable seems to be missing.
Working directory
By default, jobs run from your home directory. Set Working directory on the rule to run from somewhere else — useful for scripts that expect to be run from their project folder.- Use a full path —
~and%VARIABLES%aren’t expanded here. - If the folder doesn’t exist when the rule runs, the run fails with working directory not found: … in its stderr.
Checklist when a job can’t find something
- Use the full path to the program in the command (
/opt/homebrew/bin/node,C:\Tools\tool.exe). - Set the variable it needs in the rule’s Environment variables.
- Set the rule’s Working directory if the script uses relative paths.
- If you changed your shell setup or environment variables recently, restart Cronch.
- Read the run’s stderr in History & logs — the error is usually right there.