Run apple script on wake up?

SDAVE

macrumors 68040
Original poster
Jun 16, 2007
3,381
443
Nowhere
Hi there
I have an Apple script that mounts my SMB server and mounts a TimeMachine DMG in the Login Items.

But when the Mac goes to sleep and wakes up it doesn't remount the SMB, so I was thinking if it's possible to do this?
 

Shirasaki

macrumors G4
May 16, 2015
10,001
3,878
Login and wake from sleep seems to be two different things.
Don't know much about Apple script. Maybe you can create a script to monitor the state of SMB connection. And immediately reconnect once connection is lost.

My experience is, I can stack very high system uptime using sleep, when not using computer, but not entirely log out. Kinda hard to explain but you may get the idea.
 

SDAVE

macrumors 68040
Original poster
Jun 16, 2007
3,381
443
Nowhere
Login and wake from sleep seems to be two different things.
Don't know much about Apple script. Maybe you can create a script to monitor the state of SMB connection. And immediately reconnect once connection is lost.

My experience is, I can stack very high system uptime using sleep, when not using computer, but not entirely log out. Kinda hard to explain but you may get the idea.
Thanks for the reply. I use a MacBook Pro and need to be logged back into my SMB and the TimeMachine image remounted when the laptop comes back from sleep.

The TimeMachine issue is more secondary since I'm using a workaround and don't have Time Capsule, but for now put a shortcut to my Apple Script so I just run it when I come back from sleep.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.