脚步创建windows计划任务
2015-12-16 11:26
302 查看
此脚本用于在windows平台使用脚步创建任务计划,以下是我实际工作中的一个脚步,有200台服务器需要配置,所以写了此脚本用于减少工作量
本文出自 “汜水流年_” 博客,请务必保留此出处http://timefiles.blog.51cto.com/8475652/1724180
@echo off color 0a title Change profman echo ★☆ ★☆★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★ echo ★☆ ★☆★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★☆★ echo.★☆ ☆★ echo.★☆ win7以上系统请右键点击此文件“以管理员省份运行” ☆★ echo.★☆ 正在执行,请稍等...... ☆★ echo ★☆ ☆★ 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 1024 -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.CICEXTERNA"L\"「开始」菜单"\程序\启动\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
相关文章推荐
- 利用luabind从C++中传递指针到lua中,lua操作指针对象
- 如何用ASP实现权限的设置?
- 【postgresql】初次使用遇到的问题和总结
- MyBatis参数传入集合之foreach动态sql
- nginx的安装、配置和使用
- python requests https 访问出错
- 集成友盟分享SDK报错
- Java API —— 泛型
- Win10蓝牙鼠标总是频繁掉线该怎么办?
- smarty中section的使用
- imap接收邮件
- Python基础:1.数据类型(元组)
- Android UiAutomator第一个测试工程
- VS2013编写嵌入网页的ATL控件3-网页和控件通信
- sonarquer搭建问题
- Maven 使用指南
- easyui如何动态显示、隐藏列
- javascript时间戳和日期字符串相互转换
- Android编程之退出整个应用程序的方法
- 性能测试中如何确定并发用户数