Solved

RedHat Crontab fails to run at appropriate time

Posted on 2006-10-28
7
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

734 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