CRON

The cron command is used for periodic and date- and time-based scheduling.

The schedule function configures the type of schedule to run, including one-time-only (one-shot), periodic, or calendar-based runs. All runs are scheduled by month, day, hour, minute, and interval (seconds). If end-time and interval are both configured, whichever condition is reached first is applied.

CLI Syntax:
config>system>cron
    schedule schedule-name [owner schedule-owner]
        count number
        day-of-month {day-number [..day-number] | all}
        description description-string
        end-time [date | day-name] time
        hour {hour-number [..hour-number] | all}
        interval seconds 
        minute {minute-number [..minute-number] | all} 
        month {month-number [..month-number] | month-name [..month-name] | all} 
        script-policy policy-name [owner policy-owner]
        type schedule-type 
        weekday {weekday-number [..weekday-number] | day-name [..day-name] | all}
        no shutdown 

The following example creates a schedule named ‟test2” to run a script policy named ‟test_policy” every 15 minutes on the 17th of each month and every Friday until noon on December 17, 2018:

Example:
config>system>cron# schedule test2
config>system>cron>sched# day-of-month 17
config>system>cron>sched# end-time 2018/12/17 12:00
config>system>cron>sched# minute 0 15 30 45
config>system>cron>sched# weekday friday
config>system>cron>sched# script-policy ‟test_policy”
config>system>cron>sched# no shutdown