troubleshooting Question

CentOS crontab doesn't work

Avatar of Daniele Brunengo
Daniele BrunengoFlag for Italy asked on
LinuxShell Scripting
13 Comments1 Solution345 ViewsLast Modified:
Hello, I'm trying to understand why the heck my CentOS server won't run crontab as it should. All other crons run just fine, but I have setup the system crontab as shown below. It should run backup.sh at midnight, but it doesn't.

This is the job definition in the /etc/crontab file

0 0 * * * root /home/backup.sh

Open in new window


Here's part of today's logs:

Mar 23 23:00:01 srvdati CROND[17331]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:01:01 srvdati CROND[17337]: (root) CMD (run-parts /etc/cron.hourly)
Mar 23 23:01:01 srvdati run-parts(/etc/cron.hourly)[17337]: starting 0anacron
Mar 23 23:01:01 srvdati run-parts(/etc/cron.hourly)[17346]: finished 0anacron
Mar 23 23:01:01 srvdati run-parts(/etc/cron.hourly)[17337]: starting mcelog.cron
Mar 23 23:01:01 srvdati run-parts(/etc/cron.hourly)[17365]: finished mcelog.cron
Mar 23 23:10:01 srvdati CROND[17506]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:20:01 srvdati CROND[17651]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:30:01 srvdati CROND[17795]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:40:01 srvdati CROND[17941]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:50:01 srvdati CROND[18087]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 23 23:53:01 srvdati CROND[18095]: (root) CMD (/usr/lib64/sa/sa2 -A)
Mar 24 00:00:01 srvdati CROND[18240]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 00:01:01 srvdati CROND[18246]: (root) CMD (run-parts /etc/cron.hourly)
Mar 24 00:01:01 srvdati run-parts(/etc/cron.hourly)[18246]: starting 0anacron
Mar 24 00:01:01 srvdati anacron[18258]: Anacron started on 2017-03-24
Mar 24 00:01:01 srvdati anacron[18258]: Jobs will be executed sequentially
Mar 24 00:01:01 srvdati anacron[18258]: Normal exit (0 jobs run)
Mar 24 00:01:01 srvdati run-parts(/etc/cron.hourly)[18260]: finished 0anacron
Mar 24 00:01:01 srvdati run-parts(/etc/cron.hourly)[18246]: starting mcelog.cron
Mar 24 00:01:01 srvdati run-parts(/etc/cron.hourly)[18279]: finished mcelog.cron
Mar 24 00:10:01 srvdati CROND[18420]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 00:20:01 srvdati CROND[18564]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 00:30:01 srvdati CROND[18709]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 00:40:01 srvdati CROND[18855]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 00:50:01 srvdati CROND[19000]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:00:01 srvdati CROND[19142]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:01:01 srvdati CROND[19150]: (root) CMD (run-parts /etc/cron.hourly)
Mar 24 01:01:02 srvdati run-parts(/etc/cron.hourly)[19150]: starting 0anacron
Mar 24 01:01:02 srvdati anacron[19162]: Anacron started on 2017-03-24
Mar 24 01:01:02 srvdati anacron[19162]: Jobs will be executed sequentially
Mar 24 01:01:02 srvdati anacron[19162]: Normal exit (0 jobs run)
Mar 24 01:01:02 srvdati run-parts(/etc/cron.hourly)[19164]: finished 0anacron
Mar 24 01:01:02 srvdati run-parts(/etc/cron.hourly)[19150]: starting mcelog.cron
Mar 24 01:01:02 srvdati run-parts(/etc/cron.hourly)[19183]: finished mcelog.cron
Mar 24 01:10:01 srvdati CROND[19262]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:20:01 srvdati CROND[19407]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:30:01 srvdati CROND[19553]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:40:01 srvdati CROND[19698]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 24 01:50:01 srvdati CROND[19843]: (root) CMD (/usr/lib64/sa/sa1 1 1)

Open in new window


I have no emails in the root mailbox either, don't know what else to check.
ASKER CERTIFIED SOLUTION
Daniele Brunengo
IT Consultant, Web Designer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 13 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 13 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004