Last active
December 14, 2015 03:58
-
-
Save vladkorotnev/5024458 to your computer and use it in GitHub Desktop.
Auto stop minecraft server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global minut | |
on tweet() | |
tell first window of application "Terminal" | |
if get custom title of selected tab is "Server Start.sh" then | |
do script ("me * Shutdown in " & minut & "minutes *") in selected tab | |
end if | |
end tell | |
set minut to minut - 1 | |
end tweet | |
set minut to 5 --edit me | |
set origmin to minut | |
repeat origmin times | |
tweet() | |
delay 60 | |
end repeat | |
tell first window of application "Terminal" | |
do script ("me Stopping!") in selected tab | |
delay 5 | |
if get custom title of selected tab is "Server Start.sh" then | |
do script ("stop") in selected tab | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment