MSR是否支持设置一个动作,定时执行,比如每天凌晨去执行一个reset vpn的操作,求案例
(0)
最佳答案
对Device进行配置,在星期一到星期五的上午八点到下午十八点开启FortyGigE1/0/1和FortyGigE1/0/2,其它时间关闭端口,以便起到有效节能的作用。
图1-4 定时执行任务典型配置举例组网图
# 进入系统视图。
<Sysname> system-view
# 创建关闭FortyGigE1/0/1的Job。
[Sysname] scheduler job shutdown-FortyGigE1/0/1
[Sysname-job-shutdown-FortyGigE1/0/1] command 1 system-view
[Sysname-job-shutdown-FortyGigE1/0/1] command 2 interface fortygige 1/0/1
[Sysname-job-shutdown-FortyGigE1/0/1] command 3 shutdown
[Sysname-job-shutdown-FortyGigE1/0/1] quit
# 创建开启FortyGigE1/0/1的Job。
[Sysname] scheduler job start-FortyGigE1/0/1
[Sysname-job-start-FortyGigE1/0/1] command 1 system-view
[Sysname-job-start-FortyGigE1/0/1] command 2 interface fortygige 1/0/1
[Sysname-job-start-FortyGigE1/0/1] command 3 undo shutdown
[Sysname-job-start-FortyGigE1/0/1] quit
# 创建关闭FortyGigE1/0/2的Job。
[Sysname] scheduler job shutdown-FortyGigE1/0/2
[Sysname-job-shutdown-FortyGigE1/0/2] command 1 system-view
[Sysname-job-shutdown-FortyGigE1/0/2] command 2 interface fortygige 1/0/2
[Sysname-job-shutdown-FortyGigE1/0/2] command 3 shutdown
[Sysname-job-shutdown-FortyGigE1/0/2] quit
# 创建开启FortyGigE1/0/2的Job。
[Sysname] scheduler job start-FortyGigE1/0/2
[Sysname-job-start-FortyGigE1/0/2] command 1 system-view
[Sysname-job-start-FortyGigE1/0/2] command 2 interface fortygige 1/0/2
[Sysname-job-start-FortyGigE1/0/2] command 3 undo shutdown
[Sysname-job-start-FortyGigE1/0/2] quit
# 配置定时执行任务,使Device在星期一到星期五的上午八点开启pc1、pc2对应的以太网端口。
[Sysname] scheduler schedule START-pc1/pc2
[Sysname-schedule-START-pc1/pc2] job start-FortyGigE1/0/1
[Sysname-schedule-START-pc1/pc2] job start-FortyGigE1/0/2
[Sysname-schedule-START-pc1/pc2] time repeating at 8:00 week-day mon tue wed thu fri
[Sysname-schedule-START-pc1/pc2] quit
# 配置定时执行任务,使Device在星期一到星期五的下午十八点关闭pc1、pc2对应的以太网端口。
[Sysname] scheduler schedule STOP-pc1/pc2
[Sysname-schedule-STOP-pc1/pc2] job shutdown-FortyGigE1/0/1
[Sysname-schedule-STOP-pc1/pc2] job shutdown-FortyGigE1/0/2
[Sysname-schedule-STOP-pc1/pc2] time repeating at 18:00 week-day mon tue wed thu fri
[Sysname-schedule-STOP-pc1/pc2] quit
# 显示Job的配置信息。
[Sysname] display scheduler job
Job name: shutdown-FortyGigE1/0/1
system-view
interface fortygige 1/0/1
shutdown
Job name: shutdown-FortyGigE1/0/2
system-view
interface fortygige 1/0/2
shutdown
Job name: start-FortyGigE1/0/1
system-view
interface fortygige 1/0/1
undo shutdown
Job name: start-FortyGigE1/0/2
system-view
interface fortygige 1/0/2
undo shutdown
# 显示定时任务的运行信息。
[Sysname] display scheduler schedule
Schedule name : START-pc1/pc2
Schedule type : Run on every Mon Tue Wed Thu Fri at 08:00:00
Start time : Wed Sep 28 08:00:00 2011
Last execution time : Wed Sep 28 08:00:00 2011
Last completion time : Wed Sep 28 08:00:03 2011
Execution counts : 1
-----------------------------------------------------------------------
Job name Last execution status
start-FortyGigE1/0/1 Successful
start-FortyGigE1/0/2 Successful
Schedule name : STOP-pc1/pc2
Schedule type : Run on every Mon Tue Wed Thu Fri at 18:00:00
Start time : Wed Sep 28 18:00:00 2011
Last execution time : Wed Sep 28 18:00:00 2011
Last completion time : Wed Sep 28 18:00:01 2011
Execution counts : 1
-----------------------------------------------------------------------
Job name Last execution status
shutdown-FortyGigE1/0/1 Successful
shutdown-FortyGigE1/0/2 Successful
# 显示Job运行的输出信息。
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论