When you have many background jobs, that take either a few seconds or lots of minutes/hours, how do you monitor them?
How do you know when they started and when they finished, their outcome, etc. Do others, non-tenchical folks, need access to that or is it just the developers?
Cron has the capability to set environment variables. The scripts/programs can check those variables and then have the ability to adjust the type and quantity of logging according to whether they are run as cron jobs or from the command-line.
The logging of these jobs goes to a specific log file which is rotated daily. The daily logs are kept for 10 days before being discarded.
For instance this is a cron entry. Note the logfile argument as $1.
This is cron setting variables in the crontab file and this is a cronjob template