[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

RedHat Crontab fails to run at appropriate time

Posted on 2006-10-28
7
Medium Priority
?
230 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
4 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 500 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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
Course of the Month18 days, 21 hours left to enroll

834 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