I am looking for help to write a script to open and application, then quit it at a specifed interval and then loop the open and quit. In other words, I would like to open an application to run for 1 hour, then quit and restart the process 15 minutes later. Thanks for your help.
try this, save it as a stay open application:
property flag : true
on idle
if flag then
launch application "myFavouriteApp"
set flag to false
return hours
else
quit application "myFavouriteApp"
set flag to true
return 15 * minutes
end if
end idle