plist to record the script's output, and see if that includes any error messages or other indications of what's going wrong: StandardOutPath You'll have to decide which is appropriate, based on what this script does.Ĭheck system.log (you can use the Console utility to view it, or tail -f /var/log/system.log) and see if it includes anything to indicate why the script is failing.Īdd entries to the launchd. sudo launchctl load), it interacts with the system instance of launchd to manage Launch Daemons - items that run in system context, as root. launchctl load), it interacts with your user instance of launchd to manage Launch Agents - items that run in your user session, under your user identity. When you run launchctl as a normal user (e.g. You need to figure out which one you want, and use it. Sudo launchctl isn't a more powerful version of launchctl, it does something significantly different. Without knowing anything about the script, it's hard to point at what this might be, but I can suggest a few things to look at: It sounds like there's some environment dependence inside the script - essentially, it assumes something about the environment it's running in that's correct when you run it by hand, but not when launchd runs it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |