We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

MozAlarmsManager.add Redirect 1

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

This API is available on Firefox or Firefox OS for installed or higher privileged applications.


The add method is used to retrieve a list of pending alarms.


var request = navigator.mozAlarms.add(date, respectTimezone[, data]);


A Date object representing the time the alarm must be fired.
A string that indicates if the alarm must be fired respecting the timezone set with the date. Possible values are ignoreTimezone or honorTimezone.
data Optional
An arbitrary JavaScript object with data to be stored with the alarm.


A DOMRequest object to handle the success or failure of the method call.

If the method call is successfull, the request's result will be a number representing the id of the alarm.


var alarm = {
  date: new Date("July 27, 2013 20:00:00"),
  respectTimezone: 'ignoreTimezone',
  data: {
    message: "Do something dude!"

var request = navigator.mozAlarms.add(alarm.date, alarm.respectTimezone, alarm.data);

request.onsuccess = function () {
  console.log('A new alarm has been set:' + this.result);
  alarm.id = this.result; // get the id of the new alarm.

request.onerror = function () {
  console.log('operation failed: ' + this.error);


Specification Status Comment
Web Alarms API Working Draft Defines the AlarmManager interface.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support Not supported Not supported Not supported Not supported Not supported
Feature Android Firefox OS Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported 1.0 Not supported Not supported Not supported Not supported

Gecko implementation note

This API is currently available on Firefox OS only for any installed applications. The current specification for this API is not considered stable enough to unprefixed the API yet.

See also

Document Tags and Contributors

Last updated by: Sheppy,