Periodic macports update

Peng Yu pengyu.ut at
Fri Dec 28 07:07:37 PST 2012


I have the following crontab entry.

~$ sudo crontab -l
* 1 * * * bash -c "/opt/local/bin/port selfupdate; /opt/local/bin/port
upgrade outdated" 1>/tmp/portupdate_out.log 2>/tmp/portupdate_err.log

But it seems not working properly, as I always get an error like the
following after the scheduled time of the crontab entry.

~$ sudo port upgrade tk
Waiting for lock on /opt/local/var/macports/registry/.registry.lock

I also notice that launchd succeed crontab on mac OS X. So it might be
better to avoid launchd.

Does anybody have some example on how to setup up "port selfupdate"
and "port upgrade outdated" run periodically (say once a day)? Thanks!


More information about the macports-users mailing list