[Cialug] crontab not doing its thing
Daniel A. Ramaley
daniel.ramaley at drake.edu
Thu Apr 28 08:17:07 CDT 2011
If your distribution has a decent sample ntp configuration file in
place, then just edit /etc/ntp.conf (there might be an extra directory
in that path... "find /etc -name '*ntp*'" should find anything ntp-
related though). Put this line in it:
server 0.north-america.pool.ntp.org
Then tell ntp to start. That will be distribution-dependent, but usually
you can do "/etc/init.d/ntp start" (or "ntpd" (note the "d") instead of
"ntp"). To make it start on every boot will also be distro dependent; if
you tell us which one you use someone can give exact directions.
On 2011-04-27 at 13:54:26, Tim Champion wrote:
>Its because there was no full path, added /usr/sbin/ to the front, and
>it worked fine.. I'll work on setting up ntpd in my (non-existant)
>spare time.
>
>Thanks all !!
>
>Tim Champion
>timchampion at gmail.com
>
>On Wed, Apr 27, 2011 at 1:42 PM, Tom Pohl <tom at tcpconsulting.com>
wrote:
>> ntp.org had dns issues earlier this week. I wonder if they had
>> another outage. Has this worked in the past or is this a new cron
>> job?
>>
>> You might also try using the full path to ntpdate if you can't just
>> run ntpd like others have suggested.
>>
>> -Tom
>>
>>
>> On Apr 27, 2011, at 1:30 PM, David Champion <dchamp1337 at gmail.com>
>> wrote:
>>
>> I would agree, you should try to run ntpd instead of the cron job.
>>
>> I have seen some systems (older RedHat) where ntpd wouldn't stay
>> running, the system default was to run a cron task like yours.
>> Seems like a band-aid fix.
>>
>> If you want to fix the cron, try putting the full path to the binary
>> in the cron entry, since cron doesn't have any environment settings
>> like you do when you run commands from the shell.
>>
>> -dc
>>
>> On Wed, Apr 27, 2011 at 1:24 PM, Aaron Porter < <atporter at gmail.com>
>>
>> atporter at gmail.com> wrote:
>>> On Wed, Apr 27, 2011 at 11:19 AM, Tim Champion <
>>> <timchampion at gmail.com>
>>>
>>> timchampion at gmail.com> wrote:
>>> > I have the following line in cron that seems to not ever run.
>>> >
>>> > 46 03,11,19 * * * ntpdate -s 0.north-america.pool.ntp.org
>>> >
>>> > If I run the ntpdate command alone, it works. I also fire off a
>>> > backup script that runs successfully daily, so I have no idea
>>> > what's wrong
>>>
>>> here.
>>>
>>> Have you checked syslog? You should get cron run logs & errors
>>> there. Also, if time is that important to you, why not run ntpd?
>>> _______________________________________________
>>> Cialug mailing list
>>>
>>> <Cialug at cialug.org>Cialug at cialug.org
>>> <http://cialug.org/mailman/listinfo/cialug>
>>>
>>> http://cialug.org/mailman/listinfo/cialug
>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>>
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
__
Daniel A. Ramaley
Network Engineer 2
Dial Center 112, Drake University
2407 Carpenter Ave / Des Moines IA 50311 USA
Tel: +1 515 271-4540
Fax: +1 515 271-1938
E-mail: daniel.ramaley at drake.edu
More information about the Cialug
mailing list