How to Set Up a Cron Job on macOS to Auto Update Your IP

This guide is for advanced users only.

Open the program Terminal found in your Applications folder
Type in: crontab -e and press Enter.
Press "i" on the keyboard to enter insert mode.
Then paste in the following but make sure that your API key is included.
0 * * * * curl -X POST -d 'api_key=YOUR_API_KEY_HERE' -o /dev/null;
For macOS 10.14 Mojave, please use the below command instead:
0 * * * * curl -X POST -d 'api_key=YOUR_API_KEY_HERE' -L /dev/null;
or try
0 * * * * curl --location --request POST -d 'api_key=YOUR_API_KEY_HERE';
Once you have pasted in the above line, press the ESC key on the keyboard to exit the insert mode. Then type in ":wq" and press Enter.
You should then see crontab: installing new crontab in the terminal, which means that the cronjob was added successfully. 

From now on your IP will update every hour. Please keep in mind that if you have a laptop and bring it to a new location the IP will be updated from this location.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us