- Table of Contents
-
- H3C SR6608-M Router Configuration Examples All-in-One-R9141-6W100
- 00-Preface
- 01-AAA Configuration Examples
- 02-ACL Configuration Examples
- 03-MPLS over ADVPN Configuration Examples
- 04-ARP Attack Protection Configuration Examples
- 05-BFD Configuration Examples
- 06-Basic BGP Configuration Examples
- 07-BGP Route Attribute-Based Route Selection Configuration Examples
- 08-EAA Monitor Policy Configuration Examples
- 09-GRE with OSPF Configuration Examples
- 10-HoVPN Configuration Examples
- 11-IGMP Configuration Examples
- 12-IPsec Configuration Examples
- 13-IPsec Digital Certificate Authentication Configuration Examples
- 14-IPv6 IS-IS Configuration Examples
- 15-IPv6 over IPv4 GRE Tunnel Configuration Examples
- 16-IPv6 over IPv4 Manual Tunnel with OSPFv3 Configuration Examples
- 17-IS-IS Configuration Examples
- 18-Combined ISATAP Tunnel and 6to4 Tunnel Configuration Examples
- 19-L2TP over IPsec Configuration Examples
- 20-Multi-Instance L2TP Configuration Examples
- 21-L2TP Multidomain Access Configuration Examples
- 22-MPLS L3VPN Configuration Examples
- 23-MPLS OAM Configuration Examples
- 24-MPLS TE Configuration Examples
- 25-Basic MPLS Configuration Examples
- 26-NAT DNS Mapping Configuration Examples
- 27-NetStream Configuration Examples
- 28-NQA Configuration Examples
- 29-NTP Configuration Examples
- 30-OSPFv3 Configuration Examples
- 31-OSPF Configuration Examples
- 32-OSPF Multi-Process Configuration Examples
- 33-OSPF Multi-Instance Configuration Examples
- 34-Portal Configuration Examples
- 35-POS Interace Configuration Examples
- 36-RBAC Configuration Examples
- 37-RMON Configuration Examples
- 38-IPv4 NetStream Sampling Configuration Examples
- 39-SNMP Configuration Examples
- 40-SRv6 Configuration Examples
- 41-SSH Configuration Examples
- 42-Tcl Commands Configuration Examples
- 43-VLAN Configuration Examples
- 44-VRRP Configuration Examples
- 45-VXLAN over IPsec Configuration Examples
- 46-Cloudnet VPN Configuration Examples
- 47-Ethernet Link Aggregation Configuration Examples
- 48-Ethernet OAM Configuration Examples
- 49-Outbound Bidirectional NAT Configuration Examples
- 50-NAT Hairpin in C-S Mode Configuration Examples
- 51-Load Sharing NAT Server Configuration Examples
- 52-BIDIR-PIM Configuration Examples
- 53-Control Plane-Based QoS Policy Configuration Examples
- 54-Scheduling a Task Configuration Examples
- 55-Client-Initiated L2TP Tunnel Configuration Examples
- 56-LAC-Auto-Initiated L2TP Tunnel Configuration Examples
- 57-Authorized ARP Configuration Examples
- 58-GTS Configuration Examples
- 59-Traffic Policing Configuration Examples
- 60-Traffic Accounting Configuration Examples
- 61-PBR Configuration Examples
- 62-TFTP Client Software Upgrade Configuration Examples
- 63-FTP Client Software Upgrade Configuration Examples
- 64-FTP Server Software Upgrade Configuration Examples
- 65-Routing Policy Configuration Examples
- 66-Software Upgrade from the BootWare Menu Configuration Examples
- 67-Mirroring Configuration Examples
- Related Documents
-
Title | Size | Download |
---|---|---|
54-Scheduling a Task Configuration Examples | 84.29 KB |
|
H3C Routers |
Scheduling a Task |
Configuration Examples |
Copyright © 2024 New H3C Technologies Co., Ltd. All rights reserved.
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.
The information in this document is subject to change without notice.
Contents
Introduction
The following information provides examples for scheduling a task.
Prerequisites
This document applies to Comware 9-based routers. Procedures and information in the examples might be slightly different depending on the software or hardware version of the router.
The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.
This document assumes that you have basic knowledge of task scheduling.
Example: Scheduling a task
Network configuration
As shown in Figure 1, GigabitEthernet 2/0/1 and GigabitEthernet 2/0/2 on the router are each connected to a host.
Configure the router to perform the following operations:
· Enable GigabitEthernet 2/0/1 and GigabitEthernet 2/0/2 at 8:00 a.m. every Monday through Friday.
· Disable GigabitEthernet 2/0/1 and GigabitEthernet 2/0/2 at 18:00 every Monday through Friday.
Software versions used
This configuration example was created and verified on R9141P16 of the SR6608-M device.
Restrictions and guidelines
· The command line specified by the command command must be a successfully executable command line on the device.
· The command line specified by the command command cannot be telnet, ftp, ssh2, or monitor process.
· Before configuring a schedule task, check if the system time is correct. If the system time is incorrect, configure NTP or execute the clock command to ensure that the device gets the accurate time.
Procedures
1. Configure a job to disable GigabitEthernet 2/0/1.
# Create a job named shutdown-GigabitEthernet 2/0/1 and enter job view.
[Router] scheduler job shutdown-GigabitEthernet2/0/1
# Assign a command to the job to enter system view.
[Router-job-shutdown-GigabitEthernet2/0/1] command 1 system-view
# Assign a command to the job to enter GigabitEthernet 2/0/1 interface view.
[Router-job-shutdown-GigabitEthernet2/0/1] command 2 interface gigabitethernet 2/0/1
# Assign a command to the job to disable GigabitEthernet 2/0/1.
[Router-job-shutdown-GigabitEthernet2/0/1] command 3 shutdown
[Router-job-shutdown-GigabitEthernet2/0/1] quit
2. Configure a job to disable GigabitEthernet 2/0/2.
# Create a job named shutdown-GigabitEthernet 2/0/2 and enter job view.
[Router] scheduler job shutdown-GigabitEthernet2/0/2
# Assign a command to the job to enter system view.
[Router-job-shutdown-GigabitEthernet2/0/2] command 1 system-view
# Assign a command to the job to enter GigabitEthernet 2/0/2 interface view.
[Router-job-shutdown-GigabitEthernet2/0/2] command 2 interface gigabitethernet 2/0/2
# Assign a command to the job to disable GigabitEthernet 2/0/2 .
[Router-job-shutdown-GigabitEthernet2/0/2] command 3 shutdown
[Router-job-shutdown-GigabitEthernet2/0/2] quit
3. Configure a job to enable GigabitEthernet 2/0/1.
# Create a job named start-GigabitEthernet 2/0/1 and enter job view.
[Router] scheduler job start-GigabitEthernet2/0/1
# Assign a command to the job to enter system view.
[Router-job-start-GigabitEthernet2/0/1] command 1 system-view
# Assign a command to the job to enter GigabitEthernet 2/0/1 interface view.
[Router-job-start-GigabitEthernet2/0/1] command 2 interface gigabitethernet 2/0/1
# Assign a command to the job to enable GigabitEthernet 2/0/1.
[Router-job-start-GigabitEthernet2/0/1] command 3 undo shutdown
[Router-job-start-GigabitEthernet2/0/1] quit
4. Configure a job to enable GigabitEthernet 2/0/2.
# Create a job named start-GigabitEthernet 2/0/2 and enter job view.
[Router] scheduler job start-GigabitEthernet2/0/2
# Assign a command to the job to enter system view.
[Router-job-start-GigabitEthernet2/0/2] command 1 system-view
# Assign a command to the job to enter GigabitEthernet 2/0/2 interface view.
[Router-job-start-GigabitEthernet2/0/2] command 2 interface gigabitethernet 2/0/2
# Assign a command to the job to enable GigabitEthernet 2/0/2 .
[Router-job-start-GigabitEthernet2/0/2] command 3 undo shutdown
[Router-job-start-GigabitEthernet2/0/2] quit
5. Configure a schedule to enable GigabitEthernet 2/0/1 and GigabitEthernet 2/0/2 at 8:00 a.m. every Monday through Friday.
# Create a schedule named connect-host1/host2 and enter schedule view.
[Router] scheduler schedule connect-host1/host2
# Assign the job named start-GigabitEthernet 2/0/1 to the schedule.
[Router-schedule-connect-host1/host2] job start-GigabitEthernet2/0/1
# Assign the job named start-GigabitEthernet 2/0/2 to the schedule.
[Router-schedule-connect-host1/host2] job start-GigabitEthernet2/0/2
# Configure the device to execute the schedule at 8:00 a.m. every Monday through Friday.
[Router-schedule-connect-host1/host2] time repeating at 08:00 week-day Mon Tue Wed Thu Fri
[Router-schedule-connect-host1/host2] quit
6. Configure a schedule to disable GigabitEthernet 2/0/1 and GigabitEthernet 2/0/2 at 18:00 every Monday through Friday.
# Create a schedule named unconnect-host1/host2 and enter schedule view.
[Router] scheduler schedule unconnect-host1/host2
# Assign the job named shutdown-GigabitEthernet 2/0/1 to the schedule.
[Router-schedule-unconnect-host1/host2] job shutdown-GigabitEthernet2/0/1
# Assign the job named shutdown-GigabitEthernet 2/0/2 to the schedule.
[Router-schedule-unconnect-host1/host2] job shutdown-GigabitEthernet2/0/2
# Configure the device to execute the schedule at 18:00 every Monday through Friday.
[Router-schedule-unconnect-host1/host2] time repeating at 18:00 week-day Mon Tue Wed Thu Fri
[Router-schedule-unconnect-host1/host2] quit
Verifying the configuration
# Use display scheduler job to display the configuration information of all jobs.
<Router> display scheduler job
Job name: shutdown-GigabitEthernet2/0/1
system-view
interface GigabitEthernet2/0/1
shutdown
Job name: shutdown-GigabitEthernet2/0/2
system-view
interface GigabitEthernet2/0/2
shutdown
Job name: start-GigabitEthernet2/0/1
system-view
interface GigabitEthernet2/0/1
undo shutdown
Job name: start-GigabitEthernet2/0/2
system-view
interface GigabitEthernet2/0/2
undo shutdown
# Use display scheduler schedule to display the schedule information.
<Router> display scheduler schedule
Schedule name : connect-host1/host2
Schedule type : Run on every Mon Tue Wed Thu Fri at 08:00:00
Start time : Thu Nov 14 08:00:00 2013
Last execution time : Yet to be executed
-----------------------------------------------------------------------
Job name Last execution status
start-GigabitEthernet2/0/1 -NA-
start-GigabitEthernet2/0/2 -NA-
Schedule name : unconnect-host1/host2
Schedule type : Run on every Mon Tue Wed Thu Fri at 18:00:00
Start time : Wed Nov 13 18:00:00 2013
Last execution time : Yet to be executed
-----------------------------------------------------------------------
Job name Last execution status
shutdown-GigabitEthernet2/0/1 -NA-
shutdown-GigabitEthernet2/0/2 -NA-
# Use display ip interface brief to view the status of Layer 3 interfaces at 7:59 a.m.
[Router] display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
Ana3/0 down down -- --
Aux0 up down -- --
GE0/0/0 up up 192.168.100.67 --
GE2/0/1 *down down -- --
GE2/0/2 *down down -- --
# At 8:00 a.m., the following log information is displayed:
%Apr 22 08:00:10:245 2014 Router IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet2/0/1 changed to up.
%Apr 22 08:00:10:245 2014 Router IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet2/0/1 changed to up.
%Apr 22 08:00:10:250 2014 Router IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet2/0/2 changed to up.
%Apr 22 08:00:10:250 2014 Router IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet2/0/2 changed to up.
# Use display ip interface brief to view the status of Layer 3 interfaces at 8:00 a.m.
[Router] display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
Ana3/0 down down -- --
Aux0 up down -- --
GE0/0/0 up up 192.168.100.67 --
GE2/0/1 up up -- --
GE2/0/2 up up -- --
# At 18:00 p.m., the following log information is displayed:
%Apr 22 18:00:06:250 2014 Router IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet2/0/1 changed to down.
%Apr 22 18:00:06:250 2014 Router IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet2/0/1 changed to down.
%Apr 22 18:00:06:256 2014 Router IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet2/0/2 changed to down.
%Apr 22 18:00:06:256 2014 Router IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet2/0/2 changed to down.
# Use display ip interface brief to view the status of Layer 3 interfaces at 18:00 p.m.
[Router] display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
Ana3/0 down down -- --
Aux0 up down -- --
GE0/0 up up 192.168.100.67 --
GE2/0/1 *down down -- --
GE2/0/2 *down down -- --
Configuration files
#
scheduler job shutdown-GigabitEthernet2/0/1
command 1 system-view
command 2 interface gigabitethernet1/0/1
command 3 shutdown
#
scheduler job shutdown-GigabitEthernet2/0/2
command 1 system-view
command 2 interface gigabitethernet1/0/2
command 3 shutdown
#
scheduler job start-GigabitEthernet2/0/1
command 1 system-view
command 2 interface gigabitethernet1/0/1
command 3 undo shutdown
#
scheduler job start-GigabitEthernet2/0/2
command 1 system-view
command 2 interface gigabitethernet1/0/2
command 3 undo shutdown
#
scheduler schedule connect-host1/host2
job start-GigabitEthernet2/0/1
job start-GigabitEthernet2/0/2
time repeating at 08:00 week-day Mon Tue Wed Thu Fri
#
scheduler schedule unconnect-host1/host2
job shutdown-GigabitEthernet2/0/1
job shutdown-GigabitEthernet2/0/2
time repeating at 18:00 week-day Mon Tue Wed Thu Fri
#
Related documentation
· System Management Configuration Guide in H3C SR6608-M Router Configuration Guides(V9)
· System Management Command Reference in H3C SR6608-M Router Command References(V9)