PROVISIO DevBlog

Trigger Actions at a Specific Time and Day

The configuration of SiteKiosk allows you to run a number of common tasks (e.g. computer shutdown, monitor on/off, etc.) at specific times and days of the week by using the scheduling options. You can find these settings under Maintenance -> System / Monitor Settings in the configuration tool.

Using the script capabilities of SiteKiosk you can perform nearly any action you can think of at any given time and day of the year. The example script mainly uses standard Javascript and adds just a little bit of the SiteKiosk Object Model to perform SiteKiosk specific actions.

// This scheduler script supports two modes:
// 1) Define scheduled events that will repeat every day (everydaymode = true)
// 2) Define different scheduled events for every single day of the year (everydaymode = false)
//
// Only modify the configuration part of this script (lines 35 - 450).
//
// To use the script, open the SiteKiosk configuration, go to  Start Page & Browser -> Advanced -> Execute scriptfile and add the script there.

// Current date
var mydate = new Date();
// Minute of the last time check
var lastminute = 0;

// Initialization of the weekdays array
var sWeekDays = new Array(32);
for (i = 0; i<=31; i++)
{
   sWeekDays[i] = new Array(13);
   for (i2 = 0; i2<=12; i2++)
   {
      sWeekDays[i][i2] = new Array(24);
      for (i3 = 0; i3<=23; i3++)
      {
         sWeekDays[i][i2][i3] = new Array(60);
      }
   }
}

// Initialization of the everyday array
var sEveryDay = new Array(24);
for (i = 0; i<=23; i++) sEveryDay[i] = new Array(60);



// ------------------------------------------------------------------------------------------
// Configuration part (beginning)
// ------------------------------------------------------------------------------------------

// true:  scheduled events will repeat every day, use sEveryDay[hour][minute] = "yourfunction();"
// false: different scheduled events for every single day of the year, use sWeekDays[day][month][hour][minute] = "yourfunction();"
var everydaymode = true;

// period of time between the time checks in milliseconds
var period = 5000;

// Scheduled event will repeat every day, active if everydaymode is true
// sEveryDay[hour][minute] = "yourfunction();";
sEveryDay[13][40] = "BrowserDialogOverlayExampleFunction()";

// Different scheduled events for every single day of the year, active if everydaymode is false
// sWeekDays[day][month][hour][minute] = "yourfunction();";
// January
sWeekDays[01][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][01][15][30] = "BrowserDialogOverlayExampleFunction()";

// February
sWeekDays[01][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][02][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][01][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][01][15][30] = "BrowserDialogOverlayExampleFunction()";

// March
sWeekDays[01][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][03][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][03][15][30] = "BrowserDialogOverlayExampleFunction()";

// April
sWeekDays[01][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][04][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][04][15][30] = "BrowserDialogOverlayExampleFunction()";

// May
sWeekDays[01][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][05][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][05][15][30] = "BrowserDialogOverlayExampleFunction()";

// June
sWeekDays[01][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][06][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][06][15][30] = "BrowserDialogOverlayExampleFunction()";

// July
sWeekDays[01][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][07][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][07][15][30] = "BrowserDialogOverlayExampleFunction()";

// August
sWeekDays[01][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][08][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][08][15][30] = "BrowserDialogOverlayExampleFunction()";

// September
sWeekDays[01][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][09][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][09][15][30] = "BrowserDialogOverlayExampleFunction()";

// October
sWeekDays[01][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][10][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][10][15][30] = "BrowserDialogOverlayExampleFunction()";

// November
sWeekDays[01][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][11][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][11][15][30] = "BrowserDialogOverlayExampleFunction()";

// December
sWeekDays[01][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[02][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[03][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[04][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[05][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[06][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[07][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[08][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[09][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[10][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[11][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[12][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[13][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[14][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[15][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[16][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[17][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[18][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[19][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[20][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[21][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[22][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[23][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[24][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[25][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[26][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[27][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[28][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[29][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[30][12][15][30] = "BrowserDialogOverlayExampleFunction()";
sWeekDays[31][12][15][30] = "BrowserDialogOverlayExampleFunction()";

// This example function overlays the browser with a dialog
function BrowserDialogOverlayExampleFunction()
{
	mydialog = SiteKiosk.SiteKioskUI.CreateHTMLDialog();
	mydialog.URL = "https://www.provisio.com/link/WindowsIdle";
	mydialog.Closable = false;
	mydialog.CloseOnInput = true;
	mydialog.ScrollBars = false;
	mydialog.Title = false;
	mydialog.Sysmenu = false;
	mydialog.Transparency = 235;
	mydialog.Width = 1000;
	mydialog.Height = 800;
	mydialog.ShowDialog();
}

// ------------------------------------------------------------------------------------------
// Configuration part (end)
// ------------------------------------------------------------------------------------------



// Calls the event defined for the current time
function mycaller(eventID)
{
   mydate = new Date();
   myday = parseInt(mydate.getDate());
   mymonth = parseInt(mydate.getMonth());
   myhours = parseInt(mydate.getHours());
   myminutes = parseInt(mydate.getMinutes());
   if (myminutes != lastminute)
   {
      if (everydaymode)
      {
         eval(sEveryDay[myhours][myminutes]);
      }
      else
      {
         eval(sWeekDays[myday][mymonth+1][myhours][myminutes]);
      }
      lastminute = myminutes;
   }
}

// Timer that calls the mycaller function periodically
evtid = SiteKiosk.Scheduler.AddPeriodicEvent(period, mycaller);

Use the configuration part of the script to make adjustments to the settings.

Set everydaymode to true, if you want the script to do the same task at the same time of each day, set it to false, if you want to use a different time every single day of the year and even a different task for each of those.

You can change period if you want to change how often the script checks whether the given time has been reached. The default is 5000 milliseconds which should be fine in most cases.

sEveryDay is the array used when everydaymode is true. You can set the hour (00-23) and the minute (00-59) as well as the function you want to be called when the defined time has been reached.

sWeekDays is the array used when everydaymode is false. It accepts values for the day (01-31), the month (01-12), the hour (00-23) and minute (00-59). Just as with sEverDay you assign the function you want to call at the given day and time. Note that this could be a different function or a function with different parameters for every day of the year.

In the example script both arrays use the same example function named BrowserDialogOverlayExampleFunction. The function name and what the function does is just an example to demonstrate the workings of this script, it can by nearly anything you can imagine for the kiosk project you use this script with. In the script CreateHTMLDialog is used to create an overlay, that shows a webpage over the SiteKiosk browser, e.g. for informational purposes. The method returns an SKHtmlDialog object, that allows you to configure the overlay to your needs.

Save the script as a .js file, e.g. scheduler.js, and put it in the folder ..\SiteKiosk\html. Open the SiteKiosk configuration, go to Start Page & Browser -> Advanced and add it as a script SiteKiosk should execute on startup.