When I try to load a LaunchAgent plist from
launchctl I can't find out how to run a script in the home directory.
My code is:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ProgramArguments</key> <array> <string>bash</string> <string>~/script.sh</string> </array> <key>RunAtLoad</key> <true/> <key>Label</key> <string>com.tyilo.test</string> </dict> </plist>
I have tried both with and without bash and also replacing
I have also tried using
bash -c without it working.
The error code is:
`com.tyilo.test: bash: ~/script.sh: No such file or directory`