LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2012, 09:21 AM   #1
taffners
LQ Newbie
 
Registered: May 2012
Posts: 5

Rep: Reputation: Disabled
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
 
Old 05-10-2012, 09:40 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,029

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
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
30 21 * * * chromium-browser hyper.homeftp.net
:wq would write-quit out of vi.

man crontab for more info.

Last edited by schneidz; 05-10-2012 at 09:51 AM.
 
Old 05-10-2012, 12:46 PM   #3
taffners
LQ Newbie
 
Registered: May 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
schneidz

Thank you for the direction in posting.
 
Old 05-10-2012, 02:49 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gnome Open Directory launches Music App! A.Thyssen Linux - Software 1 09-01-2011 10:00 PM
LXer: Intel Launches App Store; Moblin Apps First Up LXer Syndicated Linux News 0 01-09-2010 11:00 AM
[SOLVED} Problem with App Launches in IceWM 1.2.37 HaroldWho Linux - Software 0 10-21-2009 03:51 PM
Problem with App Launches in IceWM 1.2.37 HaroldWho Linux - Software 0 10-20-2009 02:54 PM
LXer: Government Embraces Cloud Computing, Launches App Store LXer Syndicated Linux News 0 09-15-2009 08:30 PM


All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration