Cron log file

Many types of programs can be run via Cron, including CTest scripts that upload to CDash. While CDash gives information once the CMake / CTest processes have started, if the CTest scripts aren’t running, the Cron job may need to be debugged.

Debugging Cron jobs involves examining Cron logs. Cron logging is optional. For debugging, it may be easier to simply append to the end of the cron job line a file dump like:

$HOME/my_exe 1>${TMPDIR}/out.log 2>${TMPDIR}/err.log

On macOS, Cron logging is disabled by default, but the results of cron jobs are available via system mail, which is stored in /var/log/$(whoami). Apple launchd can be used instead of Cron via Property List files, but many simply prefer Cron.

On Linux systems, Cron may log to locations like “/var/log/cron”.

For systems that use “rsyslog”, check “/etc/rsyslog.conf” for this line to be uncommented:

cron.*          /var/log/cron.log