loblab / noip-renew

Auto renew (confirm) noip.com free hosts
Apache License 2.0
423 stars 134 forks source link

Timing of the Cron job shold be random #94

Open requa3r0 opened 2 years ago

requa3r0 commented 2 years ago

Hi noip-renew-skd.sh seend to be a good idear, because it will take the olad of teh noip.com servrs, and hopefully keep us under the radar.

I had to disable the noip-renew-skd.sh because it dos not work for me. If you have a hichup, and the hosts are not updated, the cron job is created anyway, and you will time out. so I just run it periodically for now.

Also the updated timing of the script in cron did not seem to work, the next run was always wrong.

But...Either way..if you use the noip-renew-skd.sh or have made a manual cron job, the timing should be random for each individual setup.

The entire script only works because noip havent preventet it from working. It may come soon enough..lets hope not.

As noip-renw is getting more and more popular, its not very good that all the scripts run at the same time world-wide...for each time-zone anyway. It will give a server spike on noup.com at some point, and it will risk the script to be blocked somehow.

This is very easily fixed if you randomise the hour and minute for each installation, Eg. A random time between 00.15 and 05:45...always avoid a XX:00 time, to avoid peaks on the hour...that will look suspicious. Like 03:34 etc.

Requaero

dwightmulcahy commented 2 years ago

Yeah... something like

    # get the next update and schedule it for random time 7 days before the required update
    nextCheckDate, nextCheckHour, nextCheckMin = \
        date.today() + timedelta(days=(1+randrange(5) if noip.next_renewal == 0 else noip.next_renewal - 7)), 9+randrange(8), randrange(59)

(I've made some mods to Robot so that I could get access to the next renewal date)

michaeldaly600 commented 1 year ago

default is to run hourly as below (XXXX is my username)??

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Sep  4 18:54:19 2022)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 1    * * *   XXXX    /usr/local/bin/noip-renew-XXXX.sh /var/log/noip-renew/XXXX