Solved

RedHat Crontab fails to run at appropriate time

Posted on 2006-10-28
7
222 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now