How Do You Troubleshoot a Crontab Problem?

Problem scenario
You have modified the crontab (e.g., with sudo crontab -e), but the job is not running.  What can you do?

Possible Solution #1
When the ultimate troubleshooting technique of a cronjob fails, configuring it to have this job * * * * * env > /tmp/list.txt, you may want to consider using Ansible.  It *can* be easier to use Ansible to configure a cron job.  Ansible's supported cron module (https://docs.ansible.com/ansible/latest/modules/cron_module.html) may work more reliably.  

To install and configure it, see this link if you are using CentOS/RHEL/Fedora, and this link if you are using SUSE.

Possible Solution #2
You may want to this this posting on Serverfault.com.

Possible Solution #3
This external site may help you.

Possible Solution #4
This site crontab.guru could also help.  It is a very good reference.

Leave a comment

Your email address will not be published. Required fields are marked *