打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Windows定时任务
Windows定时任务2007年09月20日 星期四 11:49  在Windows中,让系统定时操作比较常用的办法就是启动调度服务后使用at命令,调度服务的启动方法可以从服务,MMC中也可以使用命令行的方式"NET START SCHEDULE".     at命令的用法如下:   \\computername 指定远程计算机。 如果省略这个参数,   会计划在本地计算机上运行命令。   id 指定给已计划命令的识别号。   /delete 删除某个已计划的命令。如果省略 id,   计算机上所有已计划的命令都会被删除。   /yes 不需要进一步确认时,跟删除所有作业   的命令一起使用。   time 指定运行命令的时间。   /interactive 允许作业在运行时,与当时登录的用户   桌面进行交互。   /every:date[,...] 每个月或每个星期在指定的日期运行命令。   如果省略日期,则默认为在每月的本日运行。   /next:date[,...] 指定在下一个指定日期(如,下周四)运行命令。   如果省略日期,则默认为在每月的本日运行。   "command" 准备运行的 Windows NT 命令或批处理程序。     用法一,定时启动关闭某个服务     以RAS服务方例,让该服务在每日19:00启动,次日7:30关闭,AT命令如下:   AT 19:00 /every:M,T,W,Th,F,S,Su net start ″remote access server″   AT 7:30 /every:M,T,W,Th,F,S,Su net stop ″remote access server″     用法二,定时关机     1.编写一个批处理文件(使用批处理文件的原因是为了以后更灵活的控制而不需要重新建立调度),内容如下:   shutdown /l   如果是让机器重新启动则使用   shutdown /r   文件存为c:\autoshut.bat   2.建立自动执行条目:   at 22:00 c:\autoshut.bat     这样每天晚上22:00机器都会自动关机,在关机前会进行30秒钟的提示,倒计时的.    这是这个程序的其它用法:   shutdown [\\computername] [/l] [/a] [/r] [/t:xx] ["msg"] [/y] [/c] [/?]     Where:     \\computername   Remote computer to shut down. If no name is given but the tool is started with any of the other   options, the local computer name will be used.   /L   Specifies a local shutdown.   /A   Quits a system shutdown. This can only be done during the timeout period. If this switch is used,   all others are ignored.   /R   Restart the computer specifed after shutdown.   /T:xx   Sets the timer for system shutdown in xx seconds. The default is 20 seconds.   "msg"   Specifies an additional message with a maximum of 127 characters, surrounded by quotation marks.   /y   Answers questions with "yes".   /C   Forces running applications to close.     Caution     If you use the /c parameter, Windows 2000 ignores the application’s option to save data that   might have changed. You will see no File Save dialog box, because Windows 2000 will force the   application to close. This will result in a loss of all data not previously saved.     /? (or shutdown without parameters)   Display help.   Examples   Shutdown and reboot a remote computer.   shutdown \\IMAREMOTECOMPUTER /R   Shutdown a local computer, closing all applications in 5 seconds.   shutdown /L /C /T:5
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
组策略命令是什么?组策略命令详解
shutdown命令定时关机全攻略(2000/XP/2003)
shutdown命令定时关机全攻略
电脑延迟关机命令Shutdown详解_
教你怎样让windows XP自动关机
牛,这样也能实现电脑定时关机或重启
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服