iphone4s感觉好几天不重启会比较卡,就每天凌晨4点定时重启下系统吧。
1、ios定时任务配置文件
info.chenpeng.iphone.plist

<?xml version=”1.0″ encoding=”UTF-8″?>
Label
info.chenpeng.iphone.plist
POSIXSpawnType
Interactive
ProgramArguments
/var/mobile/chenpeng/cron.sh
StartCalendarInterval
Minute
0
LowPriorityIO
StandardErrorPath
/dev/null
StandardOutPath
/dev/null
UserName
root
KeepAlive
LaunchOnlyOnce
RunAtLoad
2、需要每小时跑任务的脚本
cron.sh

执行日志如下:

另外我还加了个每小时上传iphone系统信息、网络信息到服务器的任务,以防丢失,嘿嘿。