最佳答案
参考这个案例吧,
1、看看这个命令是否支撑
scheduler reboot at命令用来配置设备重启的具体时间和日期。
undo scheduler reboot命令用来取消定时重启配置。
【命令】
scheduler reboot at time [ date ]
undo scheduler reboot
【缺省情况】
未配置设备重启的具体时间和日期。
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
time:设备重启的时间,格式为HH:MM。HH代表小时,取值范围为0~23,MM代表分钟,取值范围为0~59。
date:设备重启的日期,格式为MM/DD/YYYY(月/日/年)或者YYYY/MM/DD(年/月/日)。
· YYYY的取值范围为2000~2035;
· MM的取值范围为1~12;
· DD的取值范围与具体月份有关。
【使用指导】
本命令会使设备在将来的某个时间点重新启动,从而导致业务中断,请谨慎使用。
如果没有指定date参数,并且:
· 配置的时间点在当前时间之后,则设备将在当天的该时间点重启;
· 配置的时间点在当前时间之前,则设备将在第二天的该时间点重启。
多次配置scheduler reboot at、scheduler reboot delay命令,最后一次执行的命令生效。
如果设备在准备重启时,用户正在进行文件操作,为了安全起见,系统将不会执行此次重启操作。
【举例】
# 假设系统的当前时间为2015年6月6日11:43,配置设备在当天中午12:00重启。
<Sysname> scheduler reboot at 12:00
Reboot system at 12:00:00 06/06/2015 (in 0 hours and 16 minutes). Confirm? [Y/N]:
【相关命令】
· scheduler reboot delay
2、把下面command中命令变为reboot即可
对Device进行配置,在星期一到星期五的上午八点到下午十八点开启GigabitEthernet1/0/1和GigabitEthernet1/0/2,其它时间关闭端口,以便起到有效节能的作用。
图1-4 定时执行任务典型配置举例组网图
# 进入系统视图。
<Sysname> system-view
# 创建关闭GigabitEthernet1/0/1的Job。
[Sysname] scheduler job shutdown-GigabitEthernet1/0/1
[Sysname-job-shutdown-GigabitEthernet1/0/1] command 1 system-view
[Sysname-job-shutdown-GigabitEthernet1/0/1] command 2 interface gigabitethernet 1/0/1
[Sysname-job-shutdown-GigabitEthernet1/0/1] command 3 shutdown
[Sysname-job-shutdown-GigabitEthernet1/0/1] quit
# 创建开启GigabitEthernet1/0/1的Job。
[Sysname] scheduler job start-GigabitEthernet1/0/1
[Sysname-job-start-GigabitEthernet1/0/1] command 1 system-view
[Sysname-job-start-GigabitEthernet1/0/1] command 2 interface gigabitethernet 1/0/1
[Sysname-job-start-GigabitEthernet1/0/1] command 3 undo shutdown
[Sysname-job-start-GigabitEthernet1/0/1] quit
# 创建关闭GigabitEthernet1/0/2的Job。
[Sysname] scheduler job shutdown-GigabitEthernet1/0/2
[Sysname-job-shutdown-GigabitEthernet1/0/2] command 1 system-view
[Sysname-job-shutdown-GigabitEthernet1/0/2] command 2 interface gigabitethernet 1/0/2
[Sysname-job-shutdown-GigabitEthernet1/0/2] command 3 shutdown
[Sysname-job-shutdown-GigabitEthernet1/0/2] quit
# 创建开启GigabitEthernet1/0/2的Job。
[Sysname] scheduler job start-GigabitEthernet1/0/2
[Sysname-job-start-GigabitEthernet1/0/2] command 1 system-view
[Sysname-job-start-GigabitEthernet1/0/2] command 2 interface gigabitethernet 1/0/2
[Sysname-job-start-GigabitEthernet1/0/2] command 3 undo shutdown
[Sysname-job-start-GigabitEthernet1/0/2] quit
# 配置定时执行任务,使Device在星期一到星期五的上午八点开启pc1、pc2对应的以太网端口。
[Sysname] scheduler schedule START-pc1/pc2
[Sysname-schedule-START-pc1/pc2] job start-GigabitEthernet1/0/1
[Sysname-schedule-START-pc1/pc2] job start-GigabitEthernet1/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-GigabitEthernet1/0/1
[Sysname-schedule-STOP-pc1/pc2] job shutdown-GigabitEthernet1/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
(0)
进入系统视图:
system-view
创建用于重启的Job:
scheduler job reboot
command 1 reboot
command 2 Y
quit
创建定时执行计划,设置每天重启时间:
scheduler schedule reboot
reboot
Job:job reboot
time repeating at 22:30
quit
保存配置:
save force
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论