Mitto CMD job - debugging

Because mitto CMD jobs don’t log the output of the command or script, outputting to a txt file is extremely useful.

For example if you wanted to pull a git repo with the command:
cd /var/mitto/data/git_repository && git pull
You’d want to know what was pulled from git, or if there was any errors.

To print the output and/or the error to a txt file, the same command would look like this:
cd /var/mitto/data/git_repository && git pull > /var/mitto/data/pull_output.txt 2>&1

To load this file in the browser using Mitto’s API:
https://{mitto_url}/api/file/pull_output.txt

> overwrites any existing data in pull_output.txt. To append to the file instead use >>