NEQTO Docs
  • Languages iconEnglish
    • 日本語
  • Docs
  • API
  • FAQ

›Utils

Getting Started

  • NEQTO Hello World!
  • Tutorial Step 1. NEQTO Console Setting
  • Tutorial Step 2. Device Settings & Launching Service (NEQTO Bridge)
  • Tutorial Step 2. Device Settings & Launching Service (STM32 Discovery)
  • Tutorial Step 2. Device Settings & Launching Service (SPRESENSE)
  • Tutorial Step 3. Application development using scripts

NEQTO

  • NEQTO Account Registration
  • Sub-accounts
  • API Usage
  • NEQTO Engine Firmware List
  • Support Guidelines
  • For safe and secure use of the NEQTO products
  • Vulnerability Disclosure Policy

NEQTO Console

  • Introduction
  • Fundamentals
  • Administrative Actions
  • Device Management
  • Linux-based Device Management
  • Batch Registration
  • Scripts
  • Actions and Contacts
  • View Data from the Console
  • NEQTO Apps

    • About NEQTO Apps
    • NEQTO Infinitypool
    • NEQTO Insights
    • NEQTO Custodia
    • NEQTO Flow
  • Machine Driver
  • Recommended Browsers
  • Billing Information

SPRESENSE

    Hardware Specifications

    • 01. About Spresense

    Software Specifications

    • 01. Operational Flow
    • 02. Initial Installation
    • 03. Spresense Wi-Fi Initial Setup
    • 04. Spresense LTE-M Initial Setup
    • 05. Debug Log Acquisition
    • 06. System LED Indications
    • 07. Event Messages
    • 08. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. GPIO
    • 12. UART
    • 13. SPI
    • 14. I2C
    • 15. ADC
    • 16. GNSS
    • 17. Camera
    • 18. Utils
    • 19. nqSpresense
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi
    • 24. nqLte

STM32 Discovery

    Hardware Specifications

    • 01. About STM32 Discovery Kit (B-L4S5I-IOT01A)

    Software Specifications

    • 01. Operational Flow
    • 02. Initial Installation
    • 03. STM32 Discovery Wi-Fi Initial Setup
    • 04. Debug Log Acquisition
    • 05. System LED Indications
    • 06. Event Messages
    • 07. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. UserSW
    • 12. GPIO
    • 13. UART
    • 14. SPI
    • 15. I2C
    • 16. ADC
    • 18. Utils
    • 19. nqDiscovery
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi

NEQTO Bridge

    Hardware Specifications

    • 01. NEQTO Bridge Module
    • 02. NEQTO Bridge Wi-Fi Module
    • 03. NEQTO Bridge LTE-1 Module
    • 04. NEQTO Bridge LTE-M/NB Module
    • 05. NEQTO Bridge IO Board
    • 06. NEQTO Bridge Digital IO Board
    • 07. NEQTO Bridge Connector Board

    Software Specifications

    • 01. Operational Flow
    • 02. NEQTO Bridge Wi-Fi Module Initial Setup
    • 03. NEQTO Bridge LTE Module Initial Setup
    • 04. Debug Log Acquisition
    • 05. System LED Indications
    • 06. Event Messages
    • 07. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. UserSW
    • 12. GPIO
    • 13. UART
    • 14. SPI
    • 15. I2C
    • 16. ADC
    • 17. BLE
    • 18. Utils
    • 19. nqBridge
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi
    • 24. nqLte
    • 25. nqLAN
    • 26. nqEx

Linux-based device

    Software Specifications

    • 01. System Requirements
    • 02. Installation
    • 03. Software Configurations
    • 04. Operational Flow
    • 05. Debug Log Acquisition
    • 06. Event Messages
    • 07. Updating Software

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. RTC
    • 10. UNIXSocket
    • 11. FileSystem
    • 12. SubProcess
    • 13. SubTask
    • 14. Queue
    • 15. Utils
    • 16. nqLinux
    • 17. nqService
    • 18. nqMqtt
    • 19. nqFOTA
    • 20. nqLAN

neqto.js Libraries

  • About neqto.js Libraries
  • UART

    • GM65 Barcode Reader
    • SRF Ultrasonic Range Finder - Serial Mode

    I2C

    • HTS221 v2 Temperature and Humidity Sensor
    • LIS2DW12 v2 Accelerometer
    • SRF Ultrasonic Range Finder - I2C Mode
    • [Archive] HTS221 Temperature and Humidity Sensor
    • [Archive] LIS2DW12 Accelerometer

    Utils

    • RTC Alarm Synchronized Scheduler

    Integration

    • AWS S3 v2
    • AWS IoT Core v2
    • Azure IoT v2
    • [Archive] GCP IoT Core
    • [Archive] AWS S3
    • [Archive] AWS IoT Core

neqto.js Snippets

  • About neqto.js Snippets
  • DataDog
  • Dropbox
  • Google Sheets
  • InfluxDB
  • Oracle Cloud Object Storage
  • Salesforce
  • Splunk
  • Niagara
  • [Archive] SAP Cloud Platform Internet of Things

Release Notes

  • NEQTO Console Updates
  • NEQTO Firmware (Bridge Wi-Fi/LTE Module) Releases
  • NEQTO Firmware (STM32 Discovery Wi-Fi) Releases
  • NEQTO Firmware (Spresense Wi-Fi/LTE-M) Releases
  • NEQTO Engine for Linux Releases
  • neqto.js Libraries Releases

RTC Alarm Synchronized Scheduler

This library is a built in class that provides functions to assist in setting the alarm occurrence time for RTC objects.

Library usage requirements
Type Utils
Name ALMSYNC
Version 1_00_00
Code size used 1.2KB
Resources used RTC x 1



Abstracts

Methods()/PropertiesSummaryNote
new ALMSYNC()Creates an ALMSYNC instance.

{ALMSYNC} Instance

Methods()/PropertiesSummaryNote
.start()Starts the first alarm.
.setNext()Starts the next alarm based on the first alarm time.
.getNext()Gets the next alarm time currently set.
.check()Checks the status of the alarm.
.stop()Stops the set alarm.
.VERSIONVersion information
maj : {number} Main Version
min : {number} Minor Version
rev : {number} Revision



Details

new ALMSYNC()

Creates an ALMSYNC instance.

NameTypeM/ODescriptionNote
return{ALMSYNC}-{ALMSYNC}: Generated {ALMSYNC}An exception will be raised if an error occurs.

.start(stepUnit,interval)

Starts the first alarm.
The first alarm is set to the time closest to the current time within the specified step unit interval starting from the absolute time 00:00:00.
After that, the .setNext() method is used to start the next alarm based on the first alarm time at the specified alarm interval.

NameTypeM/ODescription                 Note
stepUnitnumbermandatoryStep unit for first alarm [s]
Range: 1-86400
When the step unit is set to 30s:
The first alarm is the closest hh:mm:00 or hh:mm:30 from the current time.
When the step unit is set to 60s:
The first alarm is at the closest hh:[mm+1]:00 from the current time.
When the step unit is set to 300s:
The first alarm is at the closest hh:05:00, hh:10:00, hh:15:00, ... , hh:55:00, or [hh+1]:00:00 from the current time.
intervalnumbermandatoryAlarm interval [s]
Sets the alarm interval to be applied on subsequent alarm settings.
Range: 1-86400
returnboolean-Alarm setting result
true: Success
false: Failure

.setNext()

Starts the next alarm based on the first alarm time.
The .start() method must be executed in advance.

NameTypeM/ODescriptionNote
returnboolean-Alarm setting result
true: Success
false: Failure

.getNext()

Gets the next alarm time currently set.

NameTypeM/ODescriptionNote
return{Date}, null-{Date} : Currently set next alarm time
The alarm time will be a Date object.
If no alarm has been set, null will be returned.

.check()

Checks the status of the alarm.

NameTypeM/ODescriptionNote
returnnumber-Alarm occurrence status
0: No alarm occurred
1: Alarm occurred
If no alarm has been set, it will be 0.

.stop()

Stops the set alarm.

NameTypeM/ODescriptionNote
returnundefined-



Usage Examples

Sample 1

The first alarm is raised at n minutes and 0 seconds, then every 10 seconds thereafter.

// IMPORTED LIBRARIES
// - ALMSYNC

//Logging setup
log.setLevel(0,2); //-1:NONE 0:ERROR 1:WARNING 2:DEBUG 3:TRACE, 0:DISABLE 1:LOG 2:CONSOLE 3:BOTH
log.printLevel(2); //0:DISABLE 1:LOG 2:CONSOLE 3:BOTH

//Alarm config
var alarm = new ALMSYNC();
var stepUnit = 60;
var interval = 10;

alarm.start(stepUnit, interval);
print(alarm.getNext() + ' first alarm event');

//Main loop
while(1) {
    if(alarm.check()) {
        print(Date() + ' alarm event');
        alarm.setNext();
        print(alarm.getNext() + ' next alarm event');
    }
}


Updated: 2021-10-19
← [Archive] LIS2DW12 AccelerometerAWS S3 v2 →
  • Abstracts
    • {ALMSYNC} Instance
  • Details
    • new ALMSYNC()
    • .start(stepUnit,interval)
    • .setNext()
    • .getNext()
    • .check()
    • .stop()
  • Usage Examples
    • Sample 1

AboutNewsProductsFAQPrivacy PolicyVulnerability Disclosure Policy
NEQTO Console
IntroductionFundamentalsAdministrative ActionsDevice Management NEQTO Apps
NEQTO Bridge
NEQTO Bridge ModuleNEQTO Bridge Wi-Fi ModuleNEQTO Bridge LTE-1 ModuleError Logging Event Messages
API Documentation
API UsageGlobal APIRegional APIAPI Terms of Service
Jigsaw, Inc.
© 2025 JIG-SAW INC.