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.
configure 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/' commit save
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
### Added by /opt/vyatta/sbin/vyatta-update-crontab.pl ### 0 20 * * 0 root /config/scripts/ddnsupdate
In your line for set system task-scheduler task ddnsupdate executable path you forgot to include the executable.
Thanks Larry for the comment about the executable path.
these two posts are super handy. I had another script that would drop off the cron scheduler after a firmware upgrade, this is a much more robust solution. thank you.