Diagnosing cron job problems

Question:

My cron job is not running, or does not appear to be completing successfully. How can I diagnose this problem?

Answer:

Please check the following in order:

  1. Has your Centova Cast cron job been removed or altered? Login to your server via SSH as root and verify that /etc/cron.d/centovacast exists.

    The cron job is automatically set up by the installer, so if it does not exist then someone or something has removed it and you'll need to replace it.

  2. Is your cron daemon actually running the cron job? Even if the Centova Cast cron job is correctly configured in /etc/cron.d/centovacast, other mistakes in your /etc/crontab file (or other unrelated problems) may cause the cron daemon to fail to run the cron job.

    Check your cron log (usually /var/log/cron on Red Hat-based Linuxes, or /var/log/syslog on Debian-based Linuxes) and search for the words ccmanage cronjob. Find the most recent entry (near the bottom), check the date stamp and make sure it has been running within the past hour.

  3. Is your Centova Cast cron job working correctly? Try running the following command:

    /usr/local/centovacast/bin/ccmanage cronjob all --debug
    

    If any of the output lines begin with "ERR", then there is a problem with your cron job which will need to be resolved.

    If you see errors regarding cronjob.lck, this likely indicates that your filesystem permissions/ownerships have been damaged, and you should run /usr/local/centovacast/sbin/fixperms to correct them.

    If you see an Another cron job instance is already running error, wait a few minutes and try again. If the problem persists, it's likely that a past cron job has frozen up for some reason. This can usually be fixed by logging in via SSH as root and running killall -9 ccmanage.

  4. If you have run all of the above tests and cannot determine the problem, please contact the support department and provide the output from the above two steps, and we will be pleased to assist.

NOTE: This article is for Centova Cast v3 only; an alternate version exists for Centova Cast v2.