You are currently viewing How to Add a Cronjob for phpIPAM Discovery and Host Checks

How to Add a Cronjob for phpIPAM Discovery and Host Checks

Once phpIPAM is installed and subnets have been added, in order to keep subnets up to date we can create Cronjobs to run discovery and checks on each subnet. To do so, following the steps below. The following configuration focuses on the configuration required on the CLI. Additionally you need to ensure that each subnet has the following flags enabled:

  • Check host status
  • Discover new hosts
  • Resolve DNS names


The following steps were carried out and tested on Ubuntu.

Enter crontab

crontab -e

Enter the following configuration and ensure that the paths are correct for your deployment


The following configuration will run cronjobs every 15 minutes to see if devices are still connected, to see if any new devices have been discovered and also to see whether any of the IP addresses can be resolved.
*/15 * * * * /usr/bin/php /var/www/html/phpipam/functions/scripts/pingCheck.php
*/15 * * * * /usr/bin/php /var/www/html/phpipam/functions/scripts/discoveryCheck.php
*/15 * * * * /usr/bin/php /var/www/html/phpipam/functions/scripts/resolveIPaddresses.php

If you’re not sure of the php path, run the following configuration

which php

Once the above has been configured, the relevant subnets will be automatically updated.


Kelvin is a Cyber Security professional with years and experience working with organisations in different verticals, both large and small. He enjoys contributing to the Network Wizkid knowledge base and he also creates technical content. Kelvin enjoys learning new things and often does this by working on achieving new technical certifications. He holds many professional certifications and academically, he has achieved a Bachelors and Master's degree in both Computer Networks and Cyber Security.

Leave a Reply