[ad_1]
I’m attempting to begin my music app, each launched and enjoying, and some different duties, at a sure time. I wrote an applescript that runs after my vpn connects, so I do know the apple script is nice.
I opted to make use of a lunch agent for this objective.
When I attempt to load the plist:
sudo lauchctl load /Library/LaunchDaemons/com.begin.work.plist
I get this error:
sudo: launchctl: command not discovered
Right here is my plist:
<?xml model="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist model="1.0">
<dict>
<key>Label</key>
<string>com.begin.work</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>inform utility "Spotify" to activate</string>
</array>
<array>
<string>osascript</string>
<string>inform utility "Spotify" play</string>
<string>finish inform</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>1</integer>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>8</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>2</integer>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>8</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>8</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>4</integer>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>8</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>5</integer>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>8</integer>
</dict>
</dict>
</plist>
What am I doing incorrectly?
Forgive my lack of Mac information! I am a very long time Mac consumer, however I havent used the terminal very a lot, and utterly new to applescript.
[ad_2]
