I need to run a script every time my OSX server (10.5.8) the server restarts. The closest I could find was to add the script to my login items but this would only apply to one use and I need this script to be run whenever the server restarts to matter which user logs in. Is there a way to do this?
Asked
Active
Viewed 138 times
3 Answers
0
System startup on OS X is managed by launchd. See http://en.wikipedia.org/wiki/Launchd, in particular the "External links" section. Several of these documents describe how to set up launchd services.
![](../../users/profiles/27515.webp)
larsks
- 41,276
- 13
- 117
- 170
0
You can setup a cronjob that runs at reboot. Just use the alias @reboot instead of the normal time specification. See man 5 crontab
for more info.
![](../../users/profiles/12324.webp)
toppledwagon
- 4,215
- 24
- 15