Back

SetAlarm

Hello World

Set a time when you want your app to start automatically if it is not already opened.

app.SetAlarm( type, id, callback, time, interval, options )

When the alarm is fired, the global OnAlarm event will be fired.

Example - Set Alarm

function OnStart()
{
    var now = Date.now();
    app.SetAlarm( "Set", 1234, OnAlarm, Date.now() + 3000 );

    // app.ToBack();
    // app.Exit();
}

function OnAlarm( id )
{
    app.ShowPopup( "Got Alarm: id = " + id );
}
    Copy     Copy All       Run      
number: Datetime in milliseconds (from JS Date object)
number: milliseconds
string: “Set” or “Repeat” or “Cancel”
string: comma “,” separated: “ExactIdle” or Exact, App
string
number: integer
function( id )