CRONTAB entry to update DynDns??

Support section for FREESCO v0.4.x

CRONTAB entry to update DynDns??

Postby bob selby » Thu May 05, 2011 6:05 am

I find that with the standard Crontab entry "0 1 * * * dyndns 1>/dev/null 2>/dev/null" dyndns still send me reminders 5 days before the monthly expiration point which is irritating.

So, I tried with "0 */4 1,15 * * fork dyndns 1>/dev/null 2>/dev/null" which I would expect to try every 4 hours on the 1st and 15th day of the month.

Sadly it doesn't seem to work and because I was away for a few weeks and never saw the reminders from DynDns the account was deleted --- grrrrrr :-(

The IP address very rarely changes - thus the need to force an update at least once a month.

Is my understanding or the crontab entry correct??

Do I need the "fork"? - or should I remove it?

TIA
Bob
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK

Re: CRONTAB entry to update DynDns??

Postby Lightning » Thu May 05, 2011 7:27 pm

Your understanding is sort of correct, but the dates and the dyndns script is not. First you should never use "fork" inside the cron entries because cron by it's self already forks all operations. That way regardless of what happens with any specific application it will continue to work. Secondly only updating on the 1st and the 15th will not work because updates are not relevant to those dates. They are only relevant to one month since the last update.

The basic problem with dyndns is that by there own specification they require all compliant update scripts to ONLY update once a month. But if you do exactly what they ask then they will send you a notice every month that it is about to expire every three weeks. So from memory in 0.4.2 I changed the update frequency to every fifteen days. This fifteen day time period is NOT controlled by cron. The dyndns script should be ran every day so that the script can check to see when it was physically last updated and it will only allow the update after that time period. So your cron entry should reflect that and you should have it check for needing an update several times a day just to be certain it does update and there is no networking issue that might prevent it from updating on a single event.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12080
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: CRONTAB entry to update DynDns??

Postby bob selby » Fri May 06, 2011 2:24 am

Ah-ha - that explains why it seems to have stopped working since I upgraded to 042 ;-)

I had already removed the "fork" some time ago it seems - so that was a red-herring, sorry.

Going back to the default daily run....

Many thanks.
Bob
bob selby
Advanced Member
 
Posts: 302
Joined: Wed Nov 21, 2001 8:18 am
Location: London, UK


Return to FREESCO Support for v0.4.x

Who is online

Users browsing this forum: No registered users and 3 guests

cron