How to Edit
Like most things, you have a choice between the CLI and the GUI. Graphically, you can use a
plist editor to view and edit
plist files. If you have Apple Developer Tools installed, you will have Property List Editor in
/Developer/Applications. There is also a very nice third party developer
plist editor specifically for
plist editing called Launchd Editor by codepoetry. This is a $5 shareware app and well worth it.
man pages for the cryptically called
plist for options and parameters (
plist doesn't actually exist; it's merely a reference name).
/System/Library/LaunchDaemons and double-click the
com.apple.periodic-daily.plist file. It should automatically open Property List Editor.
com.apple.periodic-daily.plist in Property List Editor
There are over 30 different keys that can be set (and, IMHO, the syntax is ugly). The most important are Label and Program or ProgramArguments. The Label needs to be unique and Apple prefers (but doesn't require) that you use a domain scheme for naming. The Program or ProgramArguments key indicates the path to the executable that you want to run. The difference between the two lies in how you choose to specify any arguments: if you choose to use Program, you give the full path to the program and then indicate the arguments in ProgramArguments; if you choose to use only ProgramArguments, the first value in the array is the executable (see
/usr/sbin/periodic in Figure 16, above) and the subsequent array values are arguments (see
daily in Figure 16, above).
Using Launchd Editor: File - Open, navigate to the file (or: navigate to the file, control-click it, select Open With... and choose Launchd Editor).
com.apple.periodic-daily.plist in Launchd Editor, General tab
com.apple.periodic-daily.plist in Launchd Editor, Startup tab
com.apple.periodic-daily.plist in Launchd Editor, Configuration tab
Remember that these files belong to the global system so don't mess with these jobs! The
StartCalendarInterval key specifies when the job will be run. This launch daemon,
com.apple.periodic-daily.plist, runs its corresponding scripts in the
500.daily. If you want to run these outside of the hours indicated in the
plist file (i.e. on demand), you can use the
Figure 20. Run the daily/weekly/monthly jobs
You'll be asked for your password.
Figure 21. Enter your password
The jobs will take several minutes to run.
Figure 22. Jobs running
You'll be put back at the command prompt when the jobs have completed.