Cron Job Monitor

Description

This set of scripts reads cron job entries and check whether the cron jobs are running as it is supposed to be and, if it does, check whether there are any error messages. If it finds these problems, it creates a log and sends out email.

Location of Scripts and Their Names

Location: /data/mta/Script/Cron_check/Scripts/

GitHub Address: https://github.com/chandra-mta/MTA

cron_wrap_script Mar 03, 2021
cron_main_script Mar 03, 2021
check_cron_records.py Mar 03, 2021
monthly_cleanup.py Mar 03, 2021
send_error_list_email.py Mar 03, 2021
Retired
find_cron_records.py Nov 08, 2018
find_cron_records_colossus.py Nov 08, 2018

Please read README file for more details. /data/mta/Script/Cron_check/Scripts/README.

Sep 16, 2014Initially logged
Jul 16, 2015colossus-v added
Apr 05, 2018colossus-v needs /usr/bin/python. created its version
Nov 20, 2018han-v/luke-v added
May 13, 2019updated python3.6
May 20, 2019a time stamp bug fixed
Jun 10, 2020han-v, luke-v removed/boba-v added
Oct 26, 2020read_data_file moved from mta coomon function to avoid jinja2
Oct 27, 2020python 3.6 environment set for email
Oct 28, 2020a bug: not recording log fixed
Jan 20, 2021error checking condition updated
Mar 03, 2021python 3.8 upate

Data Needed

Environment Setting

Output Locations and File Names

How to Run the Script(s)

  1. Log into: a machine you want to check with the user you want to check
  2. run: /data/mta/Script/Cron_check/Scripts/check_cron_records.py
  3. run once a day: /data/mta/Script/Cron_check/Scripts/send_error_list_email.py
  4. run once a month: /data/mta/Script/Cron_check/Scripts/monthly_cleanup.py

How to Run Test(s)

  1. There is no test for this set of scripts.

Expected result from the test

test results -- test results -- test results

Cron Job

Web Addreess

NA

Note

None

Future Plan/Update Schedule

None


Back to Top Page