schedule_event() public method

Wrapper for scheduling cron jobs
public schedule_event ( string $hook, null | string $interval = null, array $args = [] )
$hook string
$interval null | string Defaults to hook if not supplied
$args array
 /**
  * Restart upgrade
  */
 function action_restart_update()
 {
     if (!isset($_GET['update']) || $this->upgrade_name !== sanitize_key($_GET['update'])) {
         return;
     }
     $this->as3cf->schedule_event($this->cron_hook, $this->cron_schedule_key);
     $this->change_status_request(self::STATUS_RUNNING);
 }
 /**
  * Schedule the cron
  */
 protected function schedule()
 {
     $this->as3cf->schedule_event($this->cron_hook, $this->cron_schedule_key);
 }