LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 12-09-2008, 09:06 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,121

Rep: Reputation: 58
Cron, DDclient and CentOS 5.1


I am using CentOS 5.1 and am using dynsdns. I have a cron entry that I needs to run every couple of minutes because of an abnormally short IP lease from verizon business dsl account. Here is the cron entry:

PHP Code:
00,10 * * * * root /usr/sbin/ddclient 
it is not working and whenever I check the "tail /var/log/cron"

I can see that is not running. What is it that I am not doing correctly and is there some secret to getting this to run. I need it to run every 10 minutes. thanks
 
Old 12-09-2008, 09:16 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
The crontab entry does not run every 10 minutes, just at 0 and 10 minutes of every hour. To make it run every 10 minutes, you can try
Code:
*/10 * * * * root /usr/sbin/ddclient
Now the silly questions: 1) is the cron daemon running? 2) how did you edited the crontab (crontab -e or whatever)? 3) did you receive any error message in the crontab owner's mail?

Edit: note that the user name (root) in a crontab entry is allowed only if this is the system crontab file (e.g. /etc/crontab).

Last edited by colucix; 12-09-2008 at 09:22 AM.
 
Old 12-09-2008, 01:11 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
BTW, ddclient runs in daemon mode and already checks for changes every 600 seconds (10 minutes) by default IIRC. That's how my ddclient behaves.

I believe you are just creating work for yourself.
 
Old 12-10-2008, 01:27 PM   #4
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,121

Original Poster
Rep: Reputation: 58
I changed this setting from:

PHP Code:
daemon=600 
to

PHP Code:
daemon=60 
I restarted ddclient

PHP Code:
/etc/init.d/ddclient restart 
and it is still not working.
 
Old 12-10-2008, 01:42 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Can you post your ddclient.conf? (You'll want to obfuscate your login / password.) Also, did you install ddclient from one of the CentOS yum repos?
 
Old 12-11-2008, 12:01 AM   #6
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,121

Original Poster
Rep: Reputation: 58
Actually I installed ddclient from a tar from the dyndns website. As a result of that somewhere during the install it did not create a /var/cache/ddclient directory and was unable to create a ddclient.pid. I discovered this from /var/log/messages. So I created the directory and all is well. So in the end it was the ddclient program and my install. Thanks to all.

Last edited by metallica1973; 12-16-2008 at 12:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why cron uses old version java in my VPS (centos 5)?? enes1177 Linux - Server 2 07-03-2008 06:49 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 09:16 AM
fetchmail - why does CentOS 5 not like my old cron job? mazzo Linux - Server 2 04-23-2007 04:02 PM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U Suse/Novell 11 01-04-2007 02:57 AM
How do I get cron mail to stop forwarding through localhost on CentOS 4? alexmkt Linux - Enterprise 3 11-23-2005 02:27 PM


All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration