首页 > Windows开发 > 详细

脚步创建windows计划任务

时间:2015-12-16 12:40:20      阅读:237      评论:0      收藏:0      [点我收藏+]

此脚本用于在windows平台使用脚步创建任务计划,以下是我实际工作中的一个脚步,有200台服务器需要配置,所以写了此脚本用于减少工作量

cls
@echo off
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★
echo.★☆                                                  ☆★
echo.★☆    win7以上系统请右键点击此文件“以麼省份运行”  ☆★
echo.★☆                                                  ☆★
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★
echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★
echo "添加任务计划,开机触发及每天00:00触发"
echo “Logman start Perf-20Second” > c:\performance.bat
schtasks /create /tn "performanceonstart" /ru SYSTEM /tr c:\performance.bat /sc onstart
schtasks /create /tn "performancedaily" /ru SYSTEM /tr c:\performance.bat /sc daily /st 00:00:00
echo "修改性能监控单个文件最大限制为1GB"
Logman.exe update counter Perf-20Second -f bincirc -max 2024 -c "\LogicalDisk(*)\*" "\Memory\*" "\Network Interface(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Server\*" "\System\*" "\Process(*)\*" "\Processor(*)\*" "\Cache\*" -si 00:00:20 -o C:\PerfMonLogs\Perf-20Second.blg
echo "移除开机启动项"
del  C:\Documents and Settings\All Users\「开始」菜单\程序\启动\Procmon.bat
del  C:\Documents and Settings\All Users\「开始」菜单\程序\启动\start-performan.bat
del  C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\Procmon.bat
del  C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\start-performan.bat
del  C:\Documents and Settings\osmaster.CICEXTERNAL\「开始」菜单\程序\启动\Procmon.bat
del  C:\Documents and Settings\osmaster.CICEXTERNAL\「开始」菜单\程序\启动\start-performan.bat
del  C:\Users\osmaster\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Procmon.bat
del  C:\Users\osmaster\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\start-performan.bat
pause


本文出自 “汜水流年_” 博客,请务必保留此出处http://timefiles.blog.51cto.com/8475652/1724180

脚步创建windows计划任务

原文:http://timefiles.blog.51cto.com/8475652/1724180

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!