Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




Webhead
1810 posts

Uber Geek
+1 received by user: 510

Trusted
Subscriber

Topic # 183682 26-Oct-2015 16:07
Send private message

Been trying to find out if there is any way to restart an application every x hour. Wondering if I should just look into doing it with crontab.

The problem is that this application is running on a headless Mac Mini, and it seems to consume increasing amounts of memory and CPU the longer it runs. Quitting it and then starting it again seems to fix the problem, so being able to schedule it would be nice.





Create new topic
97 posts

Master Geek
+1 received by user: 2


  Reply # 1416249 29-Oct-2015 17:21
Send private message

You could try cronniX and or launchD
And write a bash script to stop/start the application



Webhead
1810 posts

Uber Geek
+1 received by user: 510

Trusted
Subscriber

  Reply # 1416398 29-Oct-2015 20:00
Send private message

Good suggestion. Creating a shell script with /usr/bin/killall and /usr/bin/open and then using crontab works a treat :)




 
 
 
 


32 posts

Geek
+1 received by user: 3


  Reply # 1416896 30-Oct-2015 11:55
Send private message

Rather than use killall, I'd go with osascript to cleanly quit the application rather than just kill the process.  Something like:

osascript -e 'tell application "Appname" to quit'

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Public Wi-Fi plus cloud file sharing
Posted 18-Aug-2017 11:20


D-Link NZ launches professional Wireless AC Wave 2 Access Point for businesses
Posted 17-Aug-2017 19:25


Garmin introduces the Rino 700 five-watt two-way handheld radio
Posted 17-Aug-2017 19:04


Garmin announces the Foretrex 601 and Foretrex 701 Ballistic Edition for outdoor and tactical use
Posted 17-Aug-2017 19:02


Brightstar announces new distribution partnership with Samsung Knox platform in Australia
Posted 17-Aug-2017 17:07


Free gig-enabled WiFi network extends across Dunedin
Posted 17-Aug-2017 17:04


Samsung expands with connect Gear S3 Frontier
Posted 17-Aug-2017 15:55


Fact-checking Southern Cross Next cable is fastest to USA
Posted 17-Aug-2017 13:57


Thurrott says Microsoft Surface is dead last for reliability
Posted 16-Aug-2017 15:19


LibreOffice 5.4 works better with Microsoft Office files
Posted 16-Aug-2017 13:32


Certus launches Cognition
Posted 14-Aug-2017 09:31


Spark adds Cambridge, Turangi to 4.5G network
Posted 10-Aug-2017 17:55


REANNZ network to receive ongoing Government funding through to 2024
Posted 10-Aug-2017 16:05


Chorus backhaul starts with 2degrees
Posted 10-Aug-2017 15:49


New Zealanders cool on data analytics catching benefit fraud
Posted 10-Aug-2017 09:56



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.