#!------------------------------- #! Á¤ÇØÁø ½Ã°£¿¡ ÀÚµ¿ ¸®ºÎÆà Çϱâ #! by shinjinho.com #!------------------------------- # Global »ó¼ö Á¤ÀÇ TRUE = 1 SCRIPT_NAME = "\Windows\½ÃÀÛ\AutoReboot_shin.mscr" REBOOT_START_HOUR = 16 # ¼­ºê·çƾ È£Ãâ Call rebooting #!--------------------- #! ¸®ºÎÆà ó¸® ¼­ºê·çƾ #!--------------------- Sub rebooting # º¯¼ö Á¤ÀÇ bool_reset = FALSE next_time = 0 now_timestamp = TimeStamp() # ÇöÀç ½Ã°£À» ÀúÀå now_hour = formattime("H", now_timestamp) now_minute = formattime("i", now_timestamp) now_second = formattime("s", now_timestamp) # ¼³Á¤ ½Ã°£ÀÎÁö È®ÀÎÇÑ´Ù. ¹Ù·Î ¸®¼Â Çϱâ À§Çؼ­´Ù if(now_hour = REBOOT_START_HOUR && now_minute = 0) if(now_second <= 10) # ¸®¼Â¸ðµå·Î µé¾î¿Â °ÍÀ¸·Î ÆÄ¾ÇµÊ # ´ÙÀ½ ¸®¼ÂÀ» À§ÇØ ½Ã°£À» ÇÏ·ç Áõ°¡ ½ÃŲ´Ù next_time = 86460 bool_reset = TRUE endif endif # ¼³Á¤ ½Ã°£ÀÌ Áö³µ´Ù¸é ³»ÀÏ ³¯Â¥·Î ¼³Á¤Çϱâ À§ÇØ ½Ã°£À» ÇÏ·ç Áõ°¡½ÃŲ´Ù if(now_hour > REBOOT_START_HOUR || (now_hour = REBOOT_START_HOUR && now_minute > 0)) next_time = 86460 endif # ´ÙÀ½ ¸®¼Â ½Ã°£ À» °è»êÇÑ´Ù set_year = formattime("Y", now_timestamp + next_time) set_month = formattime("m", now_timestamp + next_time) set_day = formattime("d", now_timestamp + next_time) # ´ÙÀ½ ¸®¼Â ½Ã°£ ¸Þ½ÃÁö¸¦ ¸¸µç´Ù str_next_time = FormatTime("´ÙÀ½ ÀÚµ¿ ¸®¼Â ½Ã°£Àº^NL^Y³â m¿ù dÀÏ "&REBOOT_START_HOUR&"½Ã ÀÔ´Ï´Ù.", now_timestamp + next_time) # ±âÁ¸ µî·ÏµÈ ¿¹¾àÀ» »èÁ¦ÇÏ°í ´ÙÀ½ ¿¹¾àÀ» µî·ÏÇØ ³õ´Â´Ù RemoveNotifications(SCRIPT_NAME) RunAt(set_year, set_month, set_day, REBOOT_START_HOUR, "0", SCRIPT_NAME) # ¸®¼ÂÀ» °áÁ¤ÇÑ´Ù if(bool_reset) # ¸®¼Â ½ÇÇà SleepMessage(10, "Àá½Ã ÈÄ ÀÚµ¿ ¸®¼ÂÀ» ½ÇÇàÇÕ´Ï´Ù.^NL^"&str_next_time, "ÀÚµ¿ ¸®¼Â - ¾Ë¸²", TRUE) Repeat (3) Vibrate( 200 ) sleep(50) EndRepeat # ¸®¼Â Reset else # ¸®¼Â ¼³Á¤ ¾Ë¸² SleepMessage(5, "ÀÚµ¿ ¸®¼Â À» µî·ÏÇÕ´Ï´Ù.^NL^"&str_next_time, "ÀÚµ¿ ¸®¼Â - ¾Ë¸²", TRUE) endif EndSub