Support
 
Support Get Quote
 
 
 
 
Syslog

Syslog analysis:
Logging and analyzing cron job errors

2 min read
 

Cron is a Linux service used to automatically execute scheduled commands. A cron job can also be a series of shell commands, scripts, or other programs that can perform a variety of functions including sending out an email to inform you of its execution completion.

The logs generated by each cron job will be different based on the type of job and how the output is generated. If there is a problem in the execution of the cron job, the logs provide clues about the cause of the problem.

You can also add additional logging information to the output if needed.

By default, your cron output will be logged to /var/log/syslog. You can change this to another location or a file from which you can perform the analysis.

If you want the cron output to be written on a file, then follow the below steps:

  1. Open etc/rsyslog.d/50-default.conf file.
  2. Uncomment the line #cron.*
  3. Then run, sudo service rsyslog restart command.

All your cron jobs will be logged to /var/log/cron.log file.

What are crob job errors?

A cron error may appear in your log file if a process fails to run or complete.Here's an example of a cron job log.

May 14 22:20:01 ip-172-31-11-231 CRON[15296]: (ubuntu) CMD (echo 'Hello User!' 2>&1 | /usr/bin/logger -t helloCron)
May 14 22:20:01 ip-172-31-11-231 helloCron: Hello User!

Analyzing these cron job errors can help greatly in operational troubleshooting. You can do it either manually or using an automated log management solution.

Analyzing cron job errors using EventLog Analyzer

EventLog Analyzer, a comprehensive log management solution, helps analyze syslogs and identify cron job events such as cron job started, cron job terminated, cron edits, and more. Learn more.

logging-and-analysing-cron-job-error-log

You may also like

 

Interested in a
log management
solution?

Try EventLog Analyzer

Manage logs, comply with IT regulations, and mitigate security threats.

Seamlessly collect, monitor, and analyze
logs with EventLog Analyzer

Your request for a demo has been submitted successfully

Our support technicians will get back to you at the earliest.

  •  
  •  
By clicking 'Submit', you agree to processing of personal data according to the Privacy Policy.

  Zoho Corporation Pvt. Ltd. All rights reserved.

Link copied, now you can start sharing
Copy