LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cron, DDclient and CentOS 5.1 (http://www.linuxquestions.org/questions/linux-server-73/cron-ddclient-and-centos-5-1-a-689309/)

metallica1973 12-09-2008 09:06 AM

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

colucix 12-09-2008 09:16 AM

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).

anomie 12-09-2008 01:11 PM

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. ;)

metallica1973 12-10-2008 01:27 PM

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.

anomie 12-10-2008 01:42 PM

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?

metallica1973 12-11-2008 12:01 AM

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.


All times are GMT -5. The time now is 09:30 AM.