AppleScript, Keychain and GUI Access from launchd
I wanted to launch some scripts from cron (I know it's deprecated) that would mount some shares using AppleScript (so that share credentials are prompted via GUI or accessed from Keychain) and display notification through Growl. On first try, this worked under Mac OS X 10.5.5, but then began to fail after an upgrade to 10.5.6. I would find error messages that were not very clear:
Relay Mail from the Command Line on Leopard
I have some scripts that need to send mail form the command line (Terminal.app, shell, cron, at, launchd etc.). While the "mail" command works out of the box as configured - delivering mail on its own, - it will not work if your ISP blocks port 25 or your ISP's network address range is on a blacklist. You could use the "Mail.app" and Apple Script, but that requires that the user in question be logged in, and may not work for scripts run from "cron" or by "root".