@ RequirePOST public void doSafeRestart ( StaplerRequest request , StaplerResponse response ) throws IOException , ServletException { synchronized ( jobs ) { if ( ! isRestartScheduled ( ) ) { addJob ( new RestartJenkinsJob ( getCoreSource ( ) ) ) ; LOGGER . info ( "Scheduling Jenkins reboot" ) ; } } response . sendRedirect2 ( "." ) ; }
Schedules a Jenkins restart .