LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Other *NIX (https://www.linuxquestions.org/questions/other-%2Anix-55/)
-   -   cronjob that launches applescript app once a day please help (https://www.linuxquestions.org/questions/other-%2Anix-55/cronjob-that-launches-applescript-app-once-a-day-please-help-944258/)

taffners 05-10-2012 11:40 AM

cronjob that launches applescript app once a day please help
 
Hello I'm trying to make my first cron job.

I'm completely new to any type of programming and have never posted on any forum before so I hope this makes sense. I have Mac OS X 10.5.8.

My goal is to run my applescript program called beatrice.app at 9:30 pm every night. My app is located on the desktop of my computer. All the app does is open a website in chrome.

This is my code:
<?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>Label</key>
<string>com.apple.beatrice</string>
<key>ProgramArguments</key>
<array>
<string>cd</string>
<string>MacintoshHD/Users/samantha/Desktop/beatrice.app;</string>
</array>
<key>QueueDirectories</key>
<array/>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>21</integer>
<key>Minute</key>
<integer>30</integer>
</dict>
<key>WatchPaths</key>
<array/>
</dict>
</plist>

I saved this file under /System/Library/LaunchDaemons/com.apple.beatrice.plist

Afterwards I went to the command line and wrote sudo launchctl load
/System/Library/LaunchDaemons/com.apple.beatrice.plist

But nothing happens at 9:30pm

Please help.
Samantha

frankbell 05-10-2012 08:52 PM

I found this link. I hope it helps. I have no way of testing anything on a Mac.

http://apple.stackexchange.com/quest...n-job-on-a-mac


All times are GMT -5. The time now is 06:22 PM.