Jump to content

Is there a way in AppleScript to trap if the connection is lost and have an AppleScript act on this?


This topic is 2457 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is there a way in AppleScript to trap if the connection is lost and have an AppleScript act on this?

At the risk of asking and answering myself( AppleScript below )

repeat
	tell application "FileMaker Pro"
		try
			database "db"
		on error
			do shell script "sudo shutdown -r now" with administrator privileges
		end try
	end tell
	delay 59 -- 59 secs
end repeat

 

Edited by ggt667
Link to comment
Share on other sites

  • 4 months later...

This is a background script I use to make sure a server partition is always mounted.
We had irregular diconnects and this will reconnect the drive within a 10 minute time frame.
This is meant for a very 'low' use computer running background apps.

;-)

Mountdisk.jpg.1b91f7a3deb9a2242b0f0002de4ebf39.jpg

Edited by CoZiMan
notify
Link to comment
Share on other sites

This topic is 2457 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.