Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 3, 2009, 04:51 AM   #1
rethish
macrumors member
 
Join Date: Oct 2008
Scheduling an application

hi,

I want to launch my application using a time based scheduling. I have created a plist by setting the keys: Label, onDemand, ProgramArguments and
startCalenderInterval. And I placed the plist in /Library/LaunchDaemons.

Then i loaded the plist manually using the terminal. It works fine on the specified time.

I want the plist to be loaded automatically on the specified time and launch my application.

How can be it done?

Is there any thing to be set additionally?

Is LaunchDaemons the correct folder to place the plist?


thankyou in advance
rethish is offline   0 Reply With Quote
Old Jun 3, 2009, 08:14 AM   #2
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
This probably isn't the Apple-y way to do things, but I don't know what is... so here it goes:
man cron
and take a look at the options for scheduling things in crontab. You can run:
cron -e
To edit the current users crontab and have things run at a certain time, on a repeating schedule.

If you just need something to run once, you can do this with at.
man at
to see the options.

Otherwise, others will have to chime in with an Appl-ier way to achieve this.

-Lee
lee1210 is offline   0 Reply With Quote
Old Jun 3, 2009, 10:38 AM   #3
larkost
macrumors 6502a
 
Join Date: Oct 2007
We need more information:

What does your program do? Does it have a GUI (and therefore should not in principal be a daemon)? Does it need to launch when there is no user logged in? What display context are you trying to put it in (LoginWindow, Aqua, System, etc)?
larkost is offline   0 Reply With Quote
Old Jun 3, 2009, 12:48 PM   #4
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Getting Started With launchd
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Jun 5, 2009, 01:07 AM   #5
rethish
Thread Starter
macrumors member
 
Join Date: Oct 2008
Quote:
Originally Posted by larkost View Post
We need more information:

What does your program do? Does it have a GUI (and therefore should not in principal be a daemon)? Does it need to launch when there is no user logged in? What display context are you trying to put it in (LoginWindow, Aqua, System, etc)?

I need to launch TextEdit Application on a specified time. I created schedule application which create a plist file consisting of three property keys : label , Program argument, startcalendarinterval. and save it in the /Library/LaunchDaemons folder.
But it is not working.

Then i saved the plist file in ~/Library/LaunchAgents folder and i
logged out.
After i logged in, then the textedit application luanched on the specified time.

Again i saved the plist file in the same location. But i didn't logged out this time. The application is not launched.

what is the reason for this behaviour?

How can i launch the application without logging out?

thanks

Last edited by rethish; Jun 12, 2009 at 05:35 AM.
rethish is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Scheduling app James66 iPad Apps 1 Jul 19, 2014 05:57 PM
Using cron for scheduling? solomanii OS X 10.8 Mountain Lion 3 May 7, 2013 07:39 AM
iPhone: Scheduling Possible? xybadog iOS 6 5 Apr 6, 2013 08:33 AM
Event Scheduling neilc1970 Mac Basics and Help 3 Nov 11, 2012 09:37 AM
EP Scheduling question LincolnAthas Mac Applications and Mac App Store 0 Jun 28, 2012 03:20 PM

Forum Jump

All times are GMT -5. The time now is 09:31 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC