睡眠关机脚本
来源:互联网 发布:python中文编码问题 编辑:程序博客网 时间:2024/05/01 12:55
import os
import time
running = True
command = "shutdown /s"
command_time = "ping 127.0.0.1 -n 10>nul"
print time.strftime('%H%M')
while running:
if time.strftime('%H%M') == "1100":
if os.system(command) == 0:
print 'Successful shutdown the system'
else:
print 'shutdown FAILED'
else:
import time
running = True
command = "shutdown /s"
command_time = "ping 127.0.0.1 -n 10>nul"
print time.strftime('%H%M')
while running:
if time.strftime('%H%M') == "1100":
if os.system(command) == 0:
print 'Successful shutdown the system'
else:
print 'shutdown FAILED'
else:
os.system(command_time)
利用python脚本,可以设定在晚上11点休息,技术改变生活!
- 睡眠关机脚本
- 选择“关机”还是“睡眠”?
- 选择“关机”还是“睡眠”?
- windows 的关机,睡眠,休眠
- 关机脚本
- shell 脚本 睡眠
- 告别关机:windows7 休眠、睡眠大解析
- 手机QQ控制电脑关机、睡眠
- linux 实现shell睡眠脚本
- 用脚本关机,注销
- vbs关机脚本
- dos脚本定时关机
- 关机VBS脚本
- 远程关机脚本
- linux安全关机脚本
- 定时关机批处理脚本
- bat定时关机脚本
- Vista/win7中关机、睡眠和休眠的区别
- 快速排序
- NameValueCollection集合
- Hbase的SQL接口之Phoenix使用总结(1)
- spoj1182
- 1019、最大乘积连续子串解析
- 睡眠关机脚本
- 日志操作实现思路
- C#用什么方法可以减少或不使用switch
- PKU ACM/ICPC竞赛队最近八年比赛成绩
- Android实现电话状态监控
- C++异常机制的实现方式和开销分析
- iOS-色彩UIColor
- BOJ 319 3230391's easy problem
- android之layout_weight详解