Script or anything that will auto quit app after certain time of inactivity?

I am searching for a way to make apps auto quit after a certain time of inactivity.
For exmaple, if i open the app store, i would like it to close automatically after a certain amount of time, with the possibility of adding exceptions to the list.
Is this in any way possible?
Thanks/.

The above checks lsof every 30 seconds;
-) if it's been only inactive for half a second at exactly that point, it'll close it.
-) You can `while sleep 30;`
Systemd doesn't seem to have this exact behavior. Autofs does though, it has a timeout option. (Systemd's StopWhenUnneeded is for when services don't need it, and its timeout option is for how long to wait before giving up trying to mount it.)
Now I wonder if autofs can also trigger a command after unmounting...
Edit:
You can use the intofiy-tool's package's inotifywait to wait for an unmount event.
Last edited by Blµb (2014-03-14 09:52:59)

Similar Messages

  • I am looking for an ipad app that will restrict game play during certain times, but will allow education and reading apps.  Is there such an app?

    I am looking for an ipad app that will restrict game play during certain times, but will allow education and reading apps.  Is there such an app?
    I want my kids to be able to take their ipads to school - restricting game play. 

    Not aware of such an app. Here's some generalparental controls info.
    How Do I Block Websites on My iPad?
    http://www.ehow.com/how_8716944_do-block-websites-ipad.html#ixzz2lh8910jd
    How To Set Parental Controls and Block Content on the iPhone, iPad, and iPod touch
    http://blog.laptopmag.com/how-to-set-parental-controls-and-block-content-on-the- iphone-ipad-and-ipod-touch
    How to block specific websites from being accessed with Safari for iPhone and iPad
    http://www.imore.com/how-block-specific-websites-being-accessed-safari-iphone-an d-ipad
    How To Setup Parental Controls On The iPad
    http://content.mobicip.com/content/how-setup-parental-controls-ipad
    ParentKit
    https://itunes.apple.com/us/app/parentkit/id600618138?ls=1&mt=8
    Parental TimeLock - Time limit for children
    https://itunes.apple.com/us/app/parental-timelock-time-limit/id689577280?ls=1&am p;mt
     Cheers, Tom

  • Launch App at certain time, Quit App at certain time

    I am new to automator and having a hard time figuring out how to do teh following:
    1. Open an Application at a desired time say 12 am
    2. Close an Application at a desire time around 12 pm
    Thank you for your help
    stern

    Hi,
    You can save workflows as iCal Alarm Plug-ins. Try making a workflow with a "Launch Application" action (in the Finder category) and select the application you want to launch. Save the workflow by going to "Save As Plug-in..." > iCal Alarm Plug-in. You should then be able to set the time you want the application to launch.
    Similarly, create another workflow to quit the application. Put a "Run AppleScript" action in a new workflow, and say:
    tell application "YourApplication" to quit
    Then also save that workflow as an iCal Alarm plug-in, and you can set the time that you want the application to quit.
    Hope it helps!

  • Stop app after set time

    Is there a way or an app that will stop an app after a given time. There are several radio apps that I would like to go to sleep by. But I cannot figure out how to have radio app stop after 30-45 minutes.
    Thanks,
    Bill Wallace

    Well, I 'll give you one trick that I use alot when I ever wanted to know:
    When will a certain event occur in the future ?
    In your case: the event is "Time elapsed for all the events or runs".
    It may help you, and may not help you, Good luckMessage Edited by Ayman_Metwally on 02-28-2005 10:36 PM
    Ayman Mohammad Metwally
    Automation Engineer
    Egypt - Cairo
    Attachments:
    current.GIF ‏18 KB

  • Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes?

    Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes? The Ipod Touch, by itself does not allow cross-fading, therefore when the stop time is edited short, the song jusst truncates then goes to the next song. I tried the DJay ap and while it would crossfade, it would NOT read the song settings for the stop marker. So now I want to try and Ipad and see if there is an app that will READ the Itune stop settings within the song. I do NOT want an app that will allow me to DO the stop marker. I want an app that will READ the stop marker from the song as it is set in Itunes.

    Itunes provides the option for setting the Start and Stop times of each music track.  However, the start and stop times do not synchronize to the iPhone.  I don't understand why this option is even available as it doesn't work when listening to music on the phone.  I have not found another application that will support the start and stop time markets.  I have searched quite a bit for this but can't find anything.  I hope we can find something. 

  • I'm looking for a voicemail app that will automatically switch over after normal business hours and play an alternate voice-mail message. Does this currently exist?

    I’m looking for a voicemail app that will automatically switch over after normal business hours and play an alternate voice-mail message. Does this currently exist?

    Voicemail is through your carrier and on their equipment.
    It's function and features is set by them, not your phone.

  • I am running Mac OS X Lion on a brand new Mini.  Every now and then, my keyboard goes "dead."  The mouse still works but can't type.  If I restart, everything is fine again.  Is there anything that will fix this problem?

    I am running Mac OS X Lion on a brand new Mini.  Every now and then, my keyboard goes "dead."  The mouse still works but I can't type.  If I restart, everything is fine again.  Is there anything that will fix this problem?
    Also, I am trying to connect my Mini from the mini-Displayport to the Displayport of my Dell U2410 monitor.  The image is very grainy,even though it is set to the correct resolution: 1920 X 1200 at 60Hz.  If I use HDMI to VGA input, the image is much clearer.  Is there a way to get the Displayport to work?

    I'm having exactly the same keyboard issue.  Certainly nothing has ever enhanced my concentration while coding like suddenly becoming unable to type.
    I'm seeing a great many devicemgr and rake errors in my system log.  I don't know if they're related.  How 'bout you?
    If you're unfamiliar with the system log…
    Open /Applications/Utilities/Console.
    If necessary, choose View > Show Log List.
    system.log is at the top of the FILES section.
    Try searching it for hot words like DEBUG, FATAL, and aborted.
    I've found some discussions that would tend to indicate my errors are postGres related – I'm running OS X server.
    -Bryan

  • Is there a app that will tell all apps that are running and possibly how much battery power they use?

    Is there a app that will tell all apps that are running and possibly how much battery power they use?

    You don't need an app to do this.  Here's how you get the battery info.  Go to Settings>More>Battery. This will show you all the active apps and their individual battery usage.

  • I asked this question in iMovie and told it belonged here. When i try to copy homemade movie _TS format it will not auto load in DVD player original does. How do I make a copy that will auto load?

    I asked this question in iMovie and told it belonged here. When i try to copy homemade movie _TS format it will not auto load in DVD player original does. How do I make a copy that will auto load?

    garysm99 wrote:
    Not familiar with structure view. How do I go there?
    click in IDVD on this button

  • How to quit an app from dock that will not quit!

    I wanted to turn off my computer, but it asked me to quit mail. So i try to quit mail and it will not quit. Then i tried dragging it into trash, and onto the dock to get deleted but that would not work either. It won't delete or quit anywhere. And when I click "file", quick mail is not even an option! Help please

    Choose Force Quit from the Apple menu and shut it down from there. If that doesn't work, save and close everything you can and use the Activity Monitor in the /Applications/Utilities/ folder to force quit the loginwindow process.
    (85790)

  • Does anyone know of an ap that will auto call forward all voice calls from my iphone4 to a different number (office) at set times each day? IE - i want my business iphone to automatically call forward at 0830am weekdays and cancel the call forward at 6pm

    I am trying to find an app that will automatically forward all voice calls at preset times each day
    IE - at 083am weekdays
    and automatically cancel the call forward at 6pm weekdays
    At the moment i am doing it manually with alarms set to remind me
    Seems a pretty basic "want" but - i cant find anything
    And APPLE - make it easier to find APPS in the APP store - wy not have a search feature that you can type in what you are looking for??
    Thanks!!

    There are no apps to do what you want, that's why you can't find any. No app would have access to the necessary API's to do this, thus only Apple could implement such. You can suggest such to Apple here:
    http://www.apple.com/feedback/iphone.html
    Another suggestion is to look at Google Voice. I don't know if it offers these specific features or not, but it is highly customizable.

  • IPhone app that will lock SMS app?

    I'm looking for an app that will lock the SMS app down with a password? I know you can lock the whole phone down but a friend is looking to secure the SMS app as a friend of his had his phone abused by another.
    I searched the app store and couldn't find anything. Any ideas?

    I don't think Apple will allow 3rd party developers to create a new SMS app to replace their native SMS client because it duplicates functionality of their SMS app.

  • I am looking for an app that will allow me to change the times on my desktop  pictures

    I am wanting an app that will allow me more choices in changing the "change time" of my desktop pictures. 5 seconds in too fast, one minute longer than i want. I am looking for something that will give me a 10-15 second time.
    Any suggestions?

    Hi.
    Pages, part of the iWork suite from Apple.
    File formats supported by Pages
    iWork system requirements
    I hope this is helpful.

  • Is there a script (or plugin) that will take a photo and break it up into parts?

    Is there a script or plug-in out there that will take a picture and break it up into various parts (squares for example.)  The idea would be that you could automate and rapidly create a photo collage of a single image.  (See examples of what I mean in attached pics.)
    Thanks!
    This image has been resized to fit in the page. Click to enlarge.
    You get the idea.

    OK, I'm going to edit this post now that I'm at a computer with an actual step by step.
    Create a new comp the size of you our final delivered project.
    Add a photo to the timeline
    Note the size of the photo and the scale to position the photo at it's final resting place
    Calculate twice the height and width of the photo and create a new solid that is this size
    Place the solid above the photo
    Create a mask in the solid at the exact center that is the size shape you want for your photo frame
    Either invert the mask or set the mask property to Subtract to reveal a small portion of the photo
    Set the solid as a alpha inverted track matte for the photo (you should now see only a portion of the photo
    Add a rectangular shape layer with only a stroke to act as the photo frame over the mask. You may have to use two shapes or create a mask on a shape if you want to simulate polaroids
    Make the shape layer the parent of the solid you are using as a track matte so the matte will stay lined up with the frame
    Here comes the fun, select all layers and duplicate them using Ctrl/Cmnd + D
    Immediately hold down Shift + Ctrl/Cmnd + } to move all duplicates to the top
    Select the top shape layer and move the shape layer frame into a new position
    Pre-compose the top 3 layers
    Press the y key to select the Pan Benind or Anchor Point tool and move the pre-comp's anchor point to the center of the top frame
    Repeat step 11 through 15 until you have arranged your montage (it might be a good idea to have a template set up as a guide layer so you know where to put the frames
    Select all pre-comps and press Alt/Option + P to set a position keyframe for each pre-comp
    With all of the keyframe selected move them down the timeline about 3 seconds
    Now, with the CTI at the first frame drag each pre-comp into a starting position for that frame
    Preview and adjust the timing, then turn on motion blur
    Your images will now assemble themselves into the final montage.
    There is no script that I know of that will do all of this automatically, but it would not be too hard to write a script that would do the pre-composing if you have a ton of these to do. I'm guessing that with a little practice you could have a new picture frame created and moved into position in less than a minute. It takes me about 30 seconds. That means a 20 frame sequence should take you about a half hour. It might not be worth writing a script unless you have a ton of these to do. Select the bottom three layers and duplicate (Ctrl/Cmnt + D), group them at the top (Shift + Ctrl/Cmnd + } ), move the top frame layer into position, then Shift + Ctrl/Cmnd + C to pre-compose, then move the anchor point of the pre-comp, then do it again.... When you're done set a few keyframes.
    As I said, you could write a script, but you'd need a different script to move each frame into position and the script would only work for one layout. If you made a template to put on the bottom so you knew where do place the frames and which order you wanted them you could do this by hand very quickly. The sample project that I'm including which was just quickly thrown together took me less than 10 minutes. Replace my photo with one of yours and you'll get the idea.
    Dropbox - photoMontage1_CS6.aep (Note: Dropbox will probably add a .txt extension to the .aep file. Just delete it and you should be able to open the project.

  • How do i reset my security questions? I can't find anything that will let me change them

    I need to reset my security questions but i can't find anything that says reset questions here.

    The reset link will only show if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account. If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset - which will normally be by phone as they need to confirm your id and that it's your account.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

Maybe you are looking for