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 |
this probably should go in the other *nix/*bsd subforum.
i am not sure what apple script is but based on your post above it is nothing like bash script so i dont think it is cron-able. xml is not an executable format, it is a mark-up language and relies on something like a web browser to render it. if macs have cron (i beleive they do), try something like: Code:
crontab -e man crontab for more info. |
schneidz
Thank you for the direction in posting.
|
You might get more help at this site:
http://developer.apple.com/library/m...reatingLaunchd More Into: http://www.lowfokus.com/2009/11/15/cron-jobs-on-os-x/ |
All times are GMT -5. The time now is 01:45 PM. |