Updated to latest stable tonight - thanks for the exellent work guys!

Noticed 10 "Expiring Domains" in my dashboard and went to investigate.

Seems 9 out of of those 10 already was renewed according to another Domain Name Expiry Checker.

Changed crontab according to the new /scripts folder, and ran cron_domain_refresher.php by hand:

sudo -u www-data php /var/www/my.domain.dk/scripts/cron_domain_refresher.php XxMyKeyxX
Completed within 5 sec. Output: "Updated [one of the client domains]"

Ran it again ~30 mins later
Completed within 5 sec. Output: "Updated [another of my client domains]"

According to the documetation, this is by design, and it only pulls the oldest domain per run.

What defines the "oldest domain", as by running the command several times, I see it jumping around according to the "Expires" column?

Anyway, will probably set it to run every hour, just to keep up, or is there a limit for the number of whois lookups?

Thx.

Hey,

So "oldest" means the domain with the oldest domain_updated_at field in the database (you don't see this, but it's there for most things in ITFlow). This prevents you getting stuck on the same domain if there is an issue.

//  Get the oldest updated domain (MariaDB shows NULLs first when ordering by default)
$row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT domain_id, domain_name, domain_expire FROM `domains` WHERE domain_archived_at IS NULL ORDER BY domain_updated_at LIMIT 1"));

[...]

// Touch the record we're refreshing to ensure we don't loop
mysqli_query($mysqli, "UPDATE domains SET domain_updated_at = NOW() WHERE domain_id = $domain_id");

I'm planning to adjust the domain refresher to cycle through more than 1 at some point so it matches the certificate refresher (it has been mentioned elsewhere too), but as you suggest I am worried about whois lookups being rate limited. As with all things whois, it's a free for all and everyone seemingly decides their own rules.

If you actually look at a raw whois response, most suggests that automated queries aren't allowed (yeah, right…).

    wrongecho Yes, makes sense to run it more frequent or include more domains, to keep up with the number.

    One thing I noticed when running it by hand:

    Whenever it checks a domain including a Danish national letter (æ, ø or å) I get this error:
    "Undefined array key "txt" in /var/www/msp.dinadmin.dk/scripts/cron_domain_refresher.php on line 55"

    Is this informational, or does it skip that domain check?

    (For those clients with a domain including Danish national letters, I also adde the xn-- domain to the client)

    EDIT: Seems to be updating just fine…..