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
Written by Billy Watson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#