Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Crontab Issue.....Please Help

2 views
Skip to first unread message

ame...@iwc.net

unread,
Dec 5, 2006, 1:08:22 PM12/5/06
to
Hi All,

I recently installed a copy of CentOS on my server. Things 'seem' to
be running ok. I have noticed one thing though. If I make any changes
to the cron using the 'crontab -e' command, I must restart the 'crond'
process, otherwise my scripts are not executed.........

Any thoughts? Once I restart the cron, the everything executes just
fine.......

Thanks for your help.

Vilmos Soti

unread,
Dec 6, 2006, 4:04:44 PM12/6/06
to
"ame...@iwc.net" <ame...@iwc.net> writes:

I experienced, that if I make changes to cron, it needs more than
one minute to pick-up the changes. So if I put something into the
cronfile saying "55 15 ..." and do it at 15:54, then it won't get
executed.

Try "56 15 ..." or even "57 15 ...". I know, it is a pain in the ass.

Vilmos

Jeroen Geilman

unread,
Dec 6, 2006, 6:46:08 PM12/6/06
to
ame...@iwc.net wrote:

> Hi All,
>
> I recently installed a copy of CentOS on my server. Things 'seem' to
> be running ok. I have noticed one thing though. If I make any changes
> to the cron using the 'crontab -e' command, I must restart the 'crond'
> process, otherwise my scripts are not executed.........

Clarify "the cron" - there is never just one.

If you mean the system crontab, you can only edit this under controlled
circumstances - as root, and with a text editor.
You cannot run crontab -e on the system crontab - you will be editing root's
personal one.
Restarting the cron *server* is utter insanity - it runs every minute and
looks through all crontabs and directories to see what needs to be done.
It very rarely crashes, and never *needs* to be restarted for any reason
short of armageddon.

If what you actually want to do is run something from the system at a
certain time, just write a file with the cron job, make it executable, and
dump it in /etc/cron.d/ - it will get picked up fine.

Unless RHEL doesn't use that scheme, of course.
In which case they should.


--
All your bits are belong to us.

Nico

unread,
Dec 8, 2006, 4:16:24 AM12/8/06
to

Or dump them in /etc/cron.{hourly,daily,etc.}. I really like that
approach to creating new cron processes so that they get executed in
sequence with other cron jobs, to prevent things like "updatedb"
soaking up cycles and CPU needed by a dump process.

0 new messages