Reboot Time Capsule with Applescript
Post ReplyReboot Time Capsule with ApplescriptPosted: Thursday, May 8, 2014 [16:27:47] - 1
Eventually network gets slow if Time Capsule is used as a router besides being Time Machine. Rebooting it by disconnecting power cord is not too good for the Hand Drive. To reboot it on a schedule is easy enough using either daemon or cron-like jobs with AppleScrip but different scripts used for different versions of AirPort Utility. AppleScript for AirPort Utility v 6.2 -- once seems not to be enough activate application "AirPort Utility" delay 1 -- depends on a computer speed tell application "System Events" -- image 2 for the first Airport station, 3 for the second and so-on -- clicks on "Reboot..." item end tell AppleScript for AirPort Utility v 5.6.1 -- once seems not to be enough activate application "AirPort Utility" delay 2 tell application "System Events" -- use key code 125 (arrow down) if more than one AirPort station in AirPort Utility window. Default: first station selected, scroll down for your station -- this code selects second station in the list -- clicks on "Reboot..." item -- if confirmation window pops-up we select and click on "OK" button by issuing two tabs and pressing a spacebar -- comment it if needed end tell delay 2 tell application "AirPort Utility" to quit -- we're all done, quit the AirPort Utility I do not have earlier version of AirPort Utility - but I'm sure second script may work. |
RE: Reboot Time Capsule with ApplescriptPosted: Thursday, May 8, 2014 [16:30:17] - 2
Forgot to mention, if Base station access password is set - computer must have accessible password in a keychain for a station you want to reboot. |