Hands-on task
The crontab environment: PATH and mail
The reporting tools live in /opt/tools/bin, and rotate-reports calls its neighbour report-gen without a path — in cron's stripped-down environment it won't be found. In root's crontab set the variables MAILTO=cron-alerts@example.org and a PATH that includes /opt/tools/bin as well as the system /usr/bin and /bin. Below them add a job that runs rotate-reports every day at 02:30 — write the command without a path and let cron find it through PATH.
- cron
- crontab
- environment variables
- PATH
- MAILTO