Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2013 Google
| Description: | Use the chrome.alarms module
to schedule code to run periodically
or at a specified time in the future. |
| Availability: | Google Chrome 22 |
| Permissions: | "alarms" |
| Learn more: | Event Pages |
Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
Clears all alarms.