
Why this matters
System administrators frequently need to verify that scheduled tasks completed successfully or produced the expected output. Knowing where and how cron/anacron/at log their activity helps you troubleshoot failures, capture output, and set up notifications.Cron — per-user crontab
To demonstrate, add two simple per-user cron jobs that run every minute. Edit the crontab with crontab -e and add these lines:System-wide crontab (/etc/crontab)
The system-wide crontab at /etc/crontab sets environment variables and shows the expected syntax (including the user field). It also contains MAILTO, which cron/anacron uses to email job output if system mail is configured:Anacron — for machines not running 24/7
Anacron is designed for systems that may be powered off periodically. Jobs use a named identifier, which simplifies searching logs. Example /etc/anacrontab:at (one-off scheduled jobs)
at schedules one-time jobs. To schedule a job to run in one minute and capture its output to the journal:- Create the at job; after entering your commands finish with Ctrl-D:
Quick comparison: cron, anacron, and at
Practical tips
- Use journalctl to search by custom identifiers when you pipe output through systemd-cat.
- If your distribution doesn’t use /var/log/cron, check /var/log/messages or /var/log/syslog, or query the journal directly.
- Configure MAILTO in /etc/crontab or per-user crontab if you have local mail delivery enabled and prefer email notifications for output.
On some distributions, scheduled-job messages are recorded in /var/log/messages or /var/log/syslog instead of /var/log/cron. If you don’t find entries in /var/log/cron, search those files or use journalctl to query the systemd journal.
Summary
- Check /var/log/cron for CROND/CMD messages to verify cron job execution.
- Anacron reports job starts/stops; to capture output, pipe the job to systemd-cat and then inspect journalctl.
- at logs job starts in the system logs; use systemd-cat to capture output into the journal when needed.
- Use MAILTO for email delivery of job outputs if you have the mail system configured.