Fortinet white logo
Fortinet white logo

CLI Reference

firewall schedule onetime

firewall schedule onetime

This command is used to add, edit, delete or rename one-time schedules.

Schedule objects are used to control when policies are active or inactive. The one-time schedule is for policies that are effective once for a specified period of time and then not used again.

config firewall schedule onetime
    edit {name}
    # Onetime schedule configuration.
        set name {string}   Onetime schedule name. size[31]
        set start {string}   Schedule start date and time, format hh:mm yyyy/mm/dd.
        set end {string}   Schedule end date and time, format hh:mm yyyy/mm/dd.
        set color {integer}   Color of icon on the GUI. range[0-32]
        set expiration-days {integer}   Write an event log message this many days before the schedule expires. range[0-100]
    next
end

Additional information

The following section is for those options that require additional explanation.

Syntax
config firewall schedule onetime {edit|delete|purge|rename|get|show}

Managing service group objects

The configuration of a specific onetime schedule object is the most common activity when using the config firewall schedule onetime command but some commands affect the schedule objects as a whole.

edit

Used to select which individual schedule to configure or edit values.

edit <onetime schedule>

To get a list of all of the existing service group objects, type the command:

Command Prompt (onetime) # edit ?		

If you are creating a new onetime schedule object, just type the name you wish to used after the edit command. If there are spaces in the name, use quotation marks.

delete

Used to delete an existing onetime schedule

delete <onetime schedule>
  • The <onetime schedule> can be a string of up to 64 characters.

purge

Used delete all of the existing onetime schedule objects. It deletes all of the values within the table that holds the information about service group objects within the VDOM.
purge
  • There are no options, parameters or qualifiers. Just use the enter key after entering the command
  • This command has a serious impact. Use cautiously.

rename

Used to change the name of the onetime schedule object.

rename <onetime schedule> to <new_onetime_schedule>

Options and settings within a onetime schedule

name

This field is a unique name given to represent the onetime schedule object. This setting is first defined when using the edit command to edit a category that does not currently exist. The name field of a onetime schedule object cannot be changed from within the object. It can be changed by using the rename command in the config firewall schedule onetime context.

start

This field is for specifying the starting date and time of the schedule object.

Syntax:
<hh:mm> <yyyy/mm/dd>
  • hh - hours in the 24-hour clock: 00 to 23
  • mm - Minutes in quarter hour increments: 15, 30, or 45
  • yyyy - Year, the range being: 2001-2050
  • mm - Months: 01 to 12
  • dd - Day of the month: 01 to 31

Default value: 00:00 2001/01/01

end

Enter the ending day and time of the schedule.

Syntax:
<hh:mm> <yyyy/mm/dd>
  • hh - hours in the 24-hour clock: 00 to 23
  • mm - Minutes in quarter hour increments: 15, 30, or 45
  • yyyy - Year, the range being: 2001-2050
  • mm - Months: 01 to 12
  • dd - Day of the month: 01 to 31

Default value: 00:00 2001/01/01

Example of setting the times
  • Set the start time to 1:30 p.m. on August 4, 2018
  • Set the end time to 12:45 a.m. on August 31, 2018
config firewall schedule onetime
	edit schedule1
	set start 13:30 2018/08/04
	set end 00:45 2018/08/31
end

color

This setting determines the color of the icon in the GUI. There are 32 defined colors numbered 1 to 32. 0 will set the color to default which is color number 1.

Syntax
set color <integer>
Default value: 0
Example:
config firewall schedule onetime
	edit schedule1
	set color 15
end

expiration-days

This field specifies how many days before the expiration of the schedule an event log will be generated in order to warn of the impending cancellation of the schedule. The content of the field is an integer. To generate an event, the range is 1 to 100 days. To disable the generation of the event log, enter 0.

Example
config firewall schedule onetime
	edit schedule1
	set expiration-days 5
end

Default value: 3

firewall schedule onetime

firewall schedule onetime

This command is used to add, edit, delete or rename one-time schedules.

Schedule objects are used to control when policies are active or inactive. The one-time schedule is for policies that are effective once for a specified period of time and then not used again.

config firewall schedule onetime
    edit {name}
    # Onetime schedule configuration.
        set name {string}   Onetime schedule name. size[31]
        set start {string}   Schedule start date and time, format hh:mm yyyy/mm/dd.
        set end {string}   Schedule end date and time, format hh:mm yyyy/mm/dd.
        set color {integer}   Color of icon on the GUI. range[0-32]
        set expiration-days {integer}   Write an event log message this many days before the schedule expires. range[0-100]
    next
end

Additional information

The following section is for those options that require additional explanation.

Syntax
config firewall schedule onetime {edit|delete|purge|rename|get|show}

Managing service group objects

The configuration of a specific onetime schedule object is the most common activity when using the config firewall schedule onetime command but some commands affect the schedule objects as a whole.

edit

Used to select which individual schedule to configure or edit values.

edit <onetime schedule>

To get a list of all of the existing service group objects, type the command:

Command Prompt (onetime) # edit ?		

If you are creating a new onetime schedule object, just type the name you wish to used after the edit command. If there are spaces in the name, use quotation marks.

delete

Used to delete an existing onetime schedule

delete <onetime schedule>
  • The <onetime schedule> can be a string of up to 64 characters.

purge

Used delete all of the existing onetime schedule objects. It deletes all of the values within the table that holds the information about service group objects within the VDOM.
purge
  • There are no options, parameters or qualifiers. Just use the enter key after entering the command
  • This command has a serious impact. Use cautiously.

rename

Used to change the name of the onetime schedule object.

rename <onetime schedule> to <new_onetime_schedule>

Options and settings within a onetime schedule

name

This field is a unique name given to represent the onetime schedule object. This setting is first defined when using the edit command to edit a category that does not currently exist. The name field of a onetime schedule object cannot be changed from within the object. It can be changed by using the rename command in the config firewall schedule onetime context.

start

This field is for specifying the starting date and time of the schedule object.

Syntax:
<hh:mm> <yyyy/mm/dd>
  • hh - hours in the 24-hour clock: 00 to 23
  • mm - Minutes in quarter hour increments: 15, 30, or 45
  • yyyy - Year, the range being: 2001-2050
  • mm - Months: 01 to 12
  • dd - Day of the month: 01 to 31

Default value: 00:00 2001/01/01

end

Enter the ending day and time of the schedule.

Syntax:
<hh:mm> <yyyy/mm/dd>
  • hh - hours in the 24-hour clock: 00 to 23
  • mm - Minutes in quarter hour increments: 15, 30, or 45
  • yyyy - Year, the range being: 2001-2050
  • mm - Months: 01 to 12
  • dd - Day of the month: 01 to 31

Default value: 00:00 2001/01/01

Example of setting the times
  • Set the start time to 1:30 p.m. on August 4, 2018
  • Set the end time to 12:45 a.m. on August 31, 2018
config firewall schedule onetime
	edit schedule1
	set start 13:30 2018/08/04
	set end 00:45 2018/08/31
end

color

This setting determines the color of the icon in the GUI. There are 32 defined colors numbered 1 to 32. 0 will set the color to default which is color number 1.

Syntax
set color <integer>
Default value: 0
Example:
config firewall schedule onetime
	edit schedule1
	set color 15
end

expiration-days

This field specifies how many days before the expiration of the schedule an event log will be generated in order to warn of the impending cancellation of the schedule. The content of the field is an integer. To generate an event, the range is 1 to 100 days. To disable the generation of the event log, enter 0.

Example
config firewall schedule onetime
	edit schedule1
	set expiration-days 5
end

Default value: 3