Tuesday, September 30

Managing Crons In linux

Not a nightmare anymore ..

What is Cron ?
Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.

With increasing servers, applications, crons (schedule jobs) it was becoming pain to manage and monitor all crons.
We thus built NCConfig – a tool to monitor all crons which includes their status - Success/Failure, executing time, output, etc

Few major problems which we used to face before building NCConfig

- Did my job actually run?
Generally all crons were used to be monitored via email now because the typical way to monitor cron jobs is via email it is often extremely hard to find out if a job has actually run successfully. Ideally your monitoring shouldn’t involve people being awake and willing to read automatically generated emails. Especially if the cron job is important.

- Email, email everywhere!
Cron used to email the output of a given job to the user that the job is running as. This can be very useful when some aspect of the job requires alerting the user.
The problem is that you very often do not want emails from cron jobs. And usually when they start they can flood your inbox very fast.

- Where is my cron running ?
With more than 100 serves and single applications running on multiple servers its sometime get difficault to find where actually is my cron running.

- Execution Statistics
You may see the cron job execution statistics (including the total number of successful executions,  total number of failed executions (TF) and number of consecutive failed executions (CF)) in the cron job list