Part 2: Updating DDNS on EdgeRouter Lite Using Crontab

Since my first post on this subject, I found a better way of doing it.

There is a feature called task-scheduler, which seems to be a wrapper for cron. The benefit to using it, however, is that your commands get saved in /config which ensures that they get copied over during firmware upgrades.

As usual, Ubiquiti’s community forums were very helpful in figuring this out. This post got me started.

These commands should be all you need to setup the task-scheduler similarly to how I had cron setup in the first post.

set system task-scheduler task ddnsupdate
set system task-scheduler task ddnsupdate crontab-spec '0 20 * * 0'
set system task-scheduler task ddnsupdate executable path '/config/scripts/'

That’s it!


If you noticed earlier, I moved the actual ddnsupdate script to /config/scripts/ which ensures that it gets copied after a firmware upgrade.

Also, you can check that those commands actually created the cronjob in /etc/cron.d/vyatta-crontab

### Added by /opt/vyatta/sbin/ ###
0 20 * * 0 root /config/scripts/ddnsupdate
This entry was posted in WPPC Networking Project and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.