Trigger: Regular Interval
This trigger will fire at a regular interval (e.g. every hour). You can specify a reference start time that the interval should be relative to. For instance if you want a regular interval to occur exactly on the hour, you should specify a reference start time on the hour.
Options
- Interval Time - The time period between each trigger fire, specified in hours, minutes, and seconds. Can also use a dictionary variable containing hours, minutes, and seconds keys.
- Reference Start Time - An optional time of day that the interval should align to. When enabled, the trigger will fire at times that are synchronized to this reference. Can also use a dictionary variable containing hour and minute keys.
- Ignore Reference Start Time - When enabled, the interval starts counting from when the macro was last saved rather than aligning to a specific time.
- Use Alarm - When enabled, uses Android's alarm functionality to ensure precise timing. This is recommended for most devices to ensure the trigger fires at the correct time, especially when the device is in deep sleep.
Variable Support
The interval and reference start time can be set using dictionary variables:
- Interval Variable - Dictionary with keys: hours, minutes, seconds
- Reference Time Variable - Dictionary with keys: hour, minute
When variables are used, the trigger will automatically reschedule if the variable values change.
Requirements
- Schedule Exact Alarm permission (Android 12+)
Examples
Example 1: Hourly reminder
Send a notification every hour:
Triggers Regular Interval: 01:00:00
Actions Display Notification: "Hourly Reminder"
Constraints Time of Day: 9:00 AM - 6:00 PM
Example 2: Periodic data sync
Sync data every 30 minutes, aligned to the hour:
Triggers Regular Interval: 00:30:00 (Reference Start Time: 00:00)
Actions HTTP Request: POST to sync endpoint Set Variable: [last_sync] = [hour]:[minute]
Constraints WiFi Connected
Notes
- For intervals longer than 24 hours, the trigger will first align to the reference time before applying the full interval
- The trigger persists its next scheduled time to a database, so it can continue from where it left off if the macro is temporarily disabled and re-enabled
- It is recommended to enable the "Use Alarm" option if you require the trigger to fire exactly at the correct time, as many devices block precise wake-ups without it
- When using variable-based intervals, changes to the variable will cause the trigger to reschedule automatically
- Legacy macros that used minutes will be automatically converted to seconds internally
See Also