periodic

To specify when a time range is in effect, use the periodic time-range configuration command. To remove the time limitation, use the no form of this command.

periodic days-of-the-week hh:mm to [days-of-the-week] hh:mm
no periodic days-of-the-week hh:mm to [days-of-the-week] hh:mm
Syntax Description

days-of-the-week

The first occurrence of this argument is the starting day or days that the associated time range is in effect. The second occurrence is the ending day or days the associated statement is in effect.

This argument can be any single day or combinations of days: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. Other possible values are:

daily -- Monday through Sunday

weekdays -- Monday through Friday

weekend -- Saturday and Sunday

If the ending days of the week are the same as the starting days of the week, they can be omitted.

hh:mm

The first occurrence of this argument is the starting hours:minutes that the associated time range is in effect. The second occurrence is the ending hours:minutes the associated statement is in effect.

The hours:minutes are expressed in a 24-hour clock. For example, 8:00 is 8:00 am and 20:00 is 8:00 pm.

Default

The time range has no recurring time limit in it.

Command Mode

Time-range configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 12.0(1).

The periodic command is one way to specify when a time range is in effect. Another way is to specify an absolute time period with the absolute command. Use either of these commands after the time-range command, which identifies the name of the time range. Multiple periodic entries are allowed per time-range command.

If the end days-of-the-week are the same as the start, they can be omitted.

If a time-range command has both absolute and periodic values specified, then the periodic items are evaluated only after the absolute start time is reached, and are not further evaluated after the absolute end time is reached.


Note: All time specifications are taken as local time. To ensure that the time range entries take effect at the desired times, you should synchronize the system clock, using NTP or the hardware calendar.

Here are some typical settings for your convenience:

If you want: Configure this:

Monday through Friday, 8:00 am to 6:00 pm only

periodic weekday 8:00 to 18:00

Every day of the week, from 8:00 am to 6:00 pm only

periodic daily 8:00 to 18:00

Every minute from Monday 8:00 am to Friday 8:00 pm

periodic monday 8:00 to friday 20:00

All weekend, from Saturday morning through Sunday night

periodic weekend 00:00 to 23:59

Saturdays and Sundays, from noon to midnight.

periodic weekend 12:00 to 23:59

Examples

The following example denies HTTP traffic on Monday through Friday between the hours of 8:00 am and 6:00 pm:

time-range no-http
periodic weekdays 8:00 to 18:00
!
ip access-list extended strict
deny tcp any any eq http time-range no-http
!
interface ethernet 0
ip access-group strict in
 
  

The following example permits Telnet traffic on Mondays, Tuesdays, and Fridays between the hours of 9:00am and 5:00 pm:

time-range testing
periodic Monday Tuesday Friday 9:00 to 17:00
!
ip access-list extended legal
permit tcp any any eq telnet time-range testing
!
interface ethernet 0
ip access-group legal in