Last Updated: February 25, 2016
·
419
· billywatson

Boot into the Cron / Monit Environment

The environment cron uses is very basic, without any sort of useful environment variables or path. You need to boot into it to properly test your cron scripts. This also works for Monit and a few other programs that use the shell.

sudo su # as the user you want (ex: sudo su kitten_lover)
env -i /bin/sh