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

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 14, 2012, 01:04 AM   #1
mehdies
macrumors member
 
Join Date: Jun 2012
launchd-Daemons run every second

Hi guys,

How i create a .plist file in /Library/LaunchDaemons that runs a executable file every second?

i mean my application execute every second.


thanks
mehdies is offline   0 Reply With Quote
Old Nov 14, 2012, 03:26 AM   #2
misee
macrumors member
 
Join Date: Jul 2010
See Running a Job Periodically
misee is offline   0 Reply With Quote
Old Nov 14, 2012, 08:17 AM   #3
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by mehdies View Post
Hi guys,

How i create a .plist file in /Library/LaunchDaemons that runs a executable file every second?

i mean my application execute every second.


thanks
What are you trying to do exactly? With a 1 second time frame it sounds like you would want to keep the application alive and run it in a loop with a one second sleep instead.
subsonix is online now   0 Reply With Quote
Old Nov 18, 2012, 05:32 AM   #4
mehdies
Thread Starter
macrumors member
 
Join Date: Jun 2012
Quote:
Originally Posted by subsonix View Post
What are you trying to do exactly? With a 1 second time frame it sounds like you would want to keep the application alive and run it in a loop with a one second sleep instead.

Yes,I exactly want to keep application alive.how can i do that?
mehdies is offline   0 Reply With Quote
Old Nov 19, 2012, 10:10 AM   #5
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by mehdies View Post
Yes,I exactly want to keep application alive.how can i do that?
With launchd and by setting a KeepAlive property to true in the property list that is associated with your program/script. The reason I asked what you where doing is that it sounds suspiciously much like polling and there may be better options available.
subsonix is online now   1 Reply With Quote
Old Nov 20, 2012, 05:14 AM   #6
mehdies
Thread Starter
macrumors member
 
Join Date: Jun 2012
I have an application .... this application has connection with kernel(a kext) and get a buffer from kext and write to file.i want to increase speed of getting and writing process so when buffer has even 1 character my daemon get that and write to file.
My application must check the buffer consecutive.
Now could you help me?


Thanks
mehdies is offline   0 Reply With Quote
Old Nov 20, 2012, 10:11 AM   #7
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by mehdies View Post
I have an application .... this application has connection with kernel(a kext) and get a buffer from kext and write to file.i want to increase speed of getting and writing process so when buffer has even 1 character my daemon get that and write to file.
My application must check the buffer consecutive.
Now could you help me?

Thanks
I did, use the KeepAlive property and set it to true in your property list. I don't know off the top of my head what options you have besides polling in your particular case, but it's probably worth investigating.
subsonix is online now   1 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
General: Safe Daemons to disable Enjoylife1788 Jailbreaks and iOS Hacks 3 Jan 15, 2014 01:19 PM
run launchd UserAgent in interval OR on login Bolzenheim OS X 10.8 Mountain Lion 0 Dec 11, 2013 12:35 PM
Debugging Daemons mehdies Mac Programming 5 Jun 20, 2013 02:46 AM
iPad: Launch Daemons on iPad Mini Chocolatemilty Jailbreaks and iOS Hacks 2 Mar 7, 2013 03:50 PM
Launch Daemons BreadedVirus iPod touch 0 Jul 14, 2012 01:19 PM

Forum Jump

All times are GMT -5. The time now is 05:21 AM.

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

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