First, create the Schedule either from the GUI or CLI.
GUI: Go to Objects > Schedules then click Add. Choose daily, weekly or non-recurring. To select multiple days during the week, choose weekly, day of week, start time, end time, click OK.
CLI: Use the set schedule command from configure mode
> configure
# set schedule schedule-block-youtube recurring daily 09:00-18:00
GUI: Go to POLICIES > Security, select the Security Policy Rule, click Actions tab, click the drop-down box for Schedule, select the created Schedule Object from first step. Click OK
CLI: Use the set rulebase security rules command from configure mode
> config
# set rulebase security rules block-youtube from L3-Trust to L3-Untrust source any destination any application youtube schedule schedule-block-youtube service any log-end yes action deny
Commit the change
Additional Information
Note: Time Zone for Schedule is based on system time configured on Device> Setup > Management > General Settings - Time Zone