Here are a few tips to get more out of Cron:
- Test your scripts using Cron limited environment
- Have it send you report to another email than root@locahost
- Make it use another shell.
# Cron only provides a limited environment.
# To simulate it to test run your scripts
# first add this to your cron:
* * * * * env > ~/cronenv
# This will export the limited cron environment to a file.
# Now launch a new shell using this file to test your scripts:
$ env - `cat ~/cronenv` /bin/sh
# Tell it what email to send output to:
# (You need to install Postfix locally before)
# In cron:
EMAIL=you@domain.com
# You can also tell it what
# shell to use with:
SHELL=/bin/bash