Solved

RedHat Crontab fails to run at appropriate time

Posted on 2006-10-28
7
223 Views
Last Modified: 2013-12-16
A few days ago, I noticed my cronjobs had stopped running. I have tried several solutions including cold reboot but all has been unsuccessful. What else in the world could cause this?

The only sensative change I know of is the adjustment of the time.  I inavertently changed the time using the desktop method of right clicking on the time and choosing the  "adjust time" option.

I also tried this on a vmware version of RedHat I have running on my laptop and the same thing happened. For some reason, the cronjobs apparently nolonger "know" what time it is. How can I undo this?

Thanks and regards,

Henry
0
Comment
Question by:Henrybg
  • 2
7 Comments
 
LVL 14

Expert Comment

by:ygoutham
ID: 17832005
chekc to see if crond is running as a daemon. if not restart the service and see

service crond restart

chkconfig --list crond (this would tell you if crond or cron daemon is running at the current boot level)

If it is a daily / hourly script, then you might consider adding the script files to the /etc/cron.daily or /etc/cron.hourly subdirecotires and have the same run presuming the rest of the cron jobs are running satisfactorily.

see if your system date and the command "date" on a terminal window are retunring the same time.

changing the system date through gui or command line should have the same impact. so need not fear any loss or wanting to do a roll-back.

if your date command return s a bad date / time, then you can set it back with date -s xxxxxxxxx.  the xxxxxxxx can also be in the same format of the output that you receive from the "date" command. this will set your time right.

goutham
0
 

Author Comment

by:Henrybg
ID: 18071567
This problem still exists. I have rolled back the changes made and the cronjob now work. I still need to ensure that root signs on only at the console or via the su options. Any recommendations on this anyone?
0
 
LVL 14

Accepted Solution

by:
ygoutham earned 125 total points
ID: 18075467
henrybg,

i am glad that your crontab now runs which i thought was the original problem. if a suggestion is given, then it is kind of prudent to repost the outcomes of the suggestion than keeping quiet.  we cannot fully reconstruct a problem and suggest the entire solution on a single post.

what you need right now is a stricter password control on the machine and even vigilant security measures in trying to curb off ssh and other means of gaining root access.  please read through /etc/ssh/sshd_config and /etc/ssh/ssh_config.  you can remove root from gaining ssh access and a user who has ssh can only do so with "sudo" or su.

next time onwards be enthusiastic about your own "query" than wait for miracles to happen by...

cheers
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 18258806
It has been another 32 days since the last comment, please give an update, accept an answer, or request the question to be closed.

Thank you.

Cyclops3590
EE Cleanup Volunteer
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question