Depending on how you trigger the script will have an effect on which user it will run as. There are a few reasons why this can happen…įirst, consider which users will be running it. That being said, there are a few cases where your script runs fine manually in the Terminal, but using an automated trigger it fails. As you can imagine, if your script doesn’t work, the trigger isn’t going to help. The first step in this process is to get a functional script. If you are unsure, I would recommend starting by looking at Darren Wallace’s blog post “Bash Scripting – Getting Started. This podcast assumes that you have a reasonable level of understanding around scripting and Mac OS X. Now before we get started, it would probably be a good idea to mention a few prerequisites. We’ll also cover event based triggers such as login, logout or sleep, and finally, how you can leverage third party programs such as Casper or Munki to provide a trigger mechanism. We’ll take a look at how you can let your users initiate the scripts, using AppleScript applications and payload free package installers. Agendaĭuring this podcast, we will take a look at running scripts at scheduled intervals by using CRON & LaunchD. So today I will be covering some of the options for triggering scripts (and other actions) in Mac OS X.
As many of you will be aware, Mac OS X has a rich set of UNIX tools under the hood that can be leveraged to make the end users life a little easier.Īlthough scripting is an art form in itself, when you start writing scripts for OS X, working out how to get the script triggered at the right time and by the right user account can be a challenge. One of my roles here is to develop technical solutions for our customers. My name is David Acland and I’ll be taking you through triggering scripts in Mac OS X. Hello and welcome to this technical podcast from Amsys.