# RebootWindows Method The RebootWindows method closes all running applications and reboots Windows. Syntax
    SiteKiosk.RebootWindows()
Return Value None. Remarks None. Examples The following example reboots Windows.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    SiteKiosk.RebootWindows();
    </SCRIPT>
The following example can be modified and added to the "TrayWindow.html" of the used browser skin to achieve that SiteKiosk reboots or shuts down at an exact point of time.
    <script language="javascript">
    // Time:
    // use time in 24-hour format (HH:MM)
    // and "0" for no action.
    // Example:
    // sWeekDays[1] = "01:25"; // Time Mondays 1:25 a.m.
    // Action:
    // true=reboot, false=shutdown
    // Example:
    // bWeekReboot[1] = false;  // Shutdown Mondays

    var sWeekDays = new Array();
    var bWeekReboot = new Array();

    // Monday:
    sWeekDays[1] = "0";
    bWeekReboot[1] = true;

    // Tuesday
    sWeekDays[2] = "0";
    bWeekReboot[2] = true;

    // Wednesday
    sWeekDays[3] = "0";
    bWeekReboot[3] = true;

    // Thursday
    sWeekDays[4] = "0";
    bWeekReboot[4] = true;

    // Friday
    sWeekDays[5] = "0";
    bWeekReboot[5] = true;

    // Saturday
    sWeekDays[6] = "0";
    bWeekReboot[6] = true;

    // Sunday
    sWeekDays[7] = "0";
    bWeekReboot[7] = true;

    // Cutomizable Scheduler to reboot/shutdown this terminal
    function CreateShutdownScheduler()
    {
       var CurrentDate = new Date();
       var Day = CurrentDate.getDay();
       var strDays = new String();
       if (sWeekDays[Day] != "0")
       {
          strDays = sWeekDays[Day];
          if (bWeekReboot[Day])
          {
             SiteKiosk.Scheduler.AddFixedTimeEvent(
             parseInt(strDays.substring(0, 2)),
             parseInt(strDays.substring(3, 5)), 0,
             RebootScheduler);
          }else
          {
             SiteKiosk.Scheduler.AddFixedTimeEvent(
             parseInt(strDays.substring(0, 2)),
             parseInt(strDays.substring(3, 5)), 0,
             ShutdownScheduler);
          }
       }
    }

    // Customizable function to reboot
    function RebootScheduler(eventID)
    {
       SiteKiosk.RebootWindows();
    }

    // Customizable function to shutdown
    function ShutdownScheduler(eventID)
    {
       SiteKiosk.ShutdownWindows();
    }

    // Create Scheduler to shutdown/reboot the terminal
    CreateShutdownScheduler();
    </script>
Back to top