Schedule Trigger
The Schedule trigger fires an automation rule on a repeating time pattern, completely independent of any device data. Use it for time-of-day routines, periodic tasks, daily reports, or any rule that should run on a clock rather than in response to a sensor event.
How It Worksβ
VWire runs a background job queue that evaluates all scheduled rules at the configured interval and fires the ones whose schedule matches the current time. The rule's conditions are then checked, and if all pass, actions run.
Clock ticks past configured interval
β
βΌ
Scheduler evaluates all schedule-type rules
β
βΌ
Rule's schedule matches β trigger fires
β
βΌ
Conditions checked (optional) β Actions run
Because the schedule trigger has no associated device or pin, template variables are not substituted from a trigger snapshot β the trigger snapshot is empty. You can still reference pin values in conditions and message templates using the {{VW-XXXXX:pin}} syntax, but those values come from the last cached reading, not from a fresh publish.
When to Use This Triggerβ
| Use Case | Example |
|---|---|
| Morning routine | Every weekday at 07:00 β turn lights on (set D0 = 1) |
| Nightly shutdown | Every day at 22:00 β power off all relays |
| Periodic sensor check | Every 30 minutes β check temperature pin, alert if too high |
| Daily report | Every day at 09:00 β send email summary via webhook |
| Irrigation cycle | Every day at 06:00 and 18:00 β run pump for 10 seconds |
| Keep-alive ping | Every 5 minutes β call a webhook heartbeat |
Step-by-Step Setupβ
Step 1 β Basicsβ
Name the rule descriptively (e.g. "Morning Light Routine" or "Daily 09:00 Status Email"). Select the Project.
Step 2 β Triggerβ
Select Schedule from the trigger type list.
| Field | Description |
|---|---|
| Interval (minutes) | Run every N minutes. Used when no cron expression is provided. |
| Cron expression | Optional. Overrides the interval. Standard 5-field cron syntax. |
Use only one of these fields:
- Leave the cron expression empty β the interval field controls the schedule.
- Fill in the cron expression β the interval field is ignored.
Interval Modeβ
Set Interval (minutes) to any positive integer. The rule fires repeatedly, every N minutes, starting from when it was last enabled or the server started.
| Value | Fires |
|---|---|
5 | Every 5 minutes |
30 | Every 30 minutes |
60 | Once per hour |
1440 | Once per day (at start time β use cron for a specific time of day) |
The simple interval cannot target a specific time of day (e.g. "every day at 07:00"). For that, use a cron expression instead.
Cron Expression Modeβ
VWire uses the standard 5-field cron format:
ββββ minute (0β59)
β ββββ hour (0β23, in the rule's Timezone)
β β ββββ day of month (1β31)
β β β ββββ month (1β12)
β β β β ββββ day of week (0β7, 0 and 7 = Sunday)
β β β β β
* * * * *
Common Cron Examplesβ
| Expression | Meaning |
|---|---|
0 7 * * * | Every day at 07:00 |
0 22 * * * | Every day at 22:00 |
0 7 * * 1-5 | MondayβFriday at 07:00 |
0 8,18 * * * | 08:00 and 18:00 every day |
*/30 * * * * | Every 30 minutes |
0 9 * * 1 | Every Monday at 09:00 |
0 0 1 * * | First day of every month at midnight |
*/5 9-17 * * 1-5 | Every 5 minutes, 09:00β17:00, MonβFri |
Cron hours are interpreted in the Timezone you set in Step 5. Set the timezone to match your local time β otherwise 0 7 * * * fires at 07:00 UTC, which may be wrong for your region.
Step 3 β Conditions (optional)β
Conditions work the same as in other trigger types β they read the current cached pin value from the most recent data received for that device + pin.
Example use cases with schedule + conditions:
- Every 30 minutes β check if temperature V1 > 25 β only then send a notification
- Every night at 22:00 β check if the pump relay D0 is still ON (=
1) β auto-turn it off
If you only want "fire at this time with no filtering", skip conditions entirely. The rule will fire on the schedule regardless of any device state.
Step 4 β Actionsβ
All standard actions are available:
| Action | Example |
|---|---|
| Set Pin Value | Turn on a relay (D0 = 1) at 07:00 and add a second rule to turn it off at 22:00 |
| Toggle Pin | Flip a pin's state on each schedule fire |
| Send Notification | "Good morning β daily routine activated" |
| Call Webhook | POST to an external API (daily report, heartbeat) |
| Send Email | Daily summary email to the team (Pro+ plan) |
| Delay | Between two Set Pin actions β e.g. run pump for 10 s then stop |
Example β pump on for 10 seconds:
| Order | Action | Details |
|---|---|---|
| 1 | Set Pin Value | D0 = 1 (pump on) |
| 2 | Delay | 10 seconds |
| 3 | Set Pin Value | D0 = 0 (pump off) |
Step 5 β Optionsβ
| Option | Notes for schedule rules |
|---|---|
| Cooldown | Rarely needed for schedule rules β the schedule itself controls frequency. Set only if you have multiple schedule-type rules with overlapping timings. |
| Timezone | Important for cron rules. Set this to your local IANA timezone (e.g. Europe/London, America/New_York, Asia/Karachi). Cron hours are interpreted in this timezone. Interval rules are unaffected by timezone. |
| Active Time Window | Can be used to further restrict when a rule can fire, but for schedule rules it's usually simpler to set the cron expression correctly instead. |
| Active Days | Useful if you're using an interval (e.g. "every 60 minutes, but only on weekdays") and don't want to write a complex cron expression. |
Worked Examplesβ
Example 1 β Irrigation Cycle (Twice Daily)β
Scenario: Run a garden irrigation pump for 30 seconds at 06:00 and 18:00 every day.
| Field | Value |
|---|---|
| Name | Irrigation Cycle |
| Project | Garden |
| Trigger | Schedule |
| Cron | 0 6,18 * * * |
| Timezone | Asia/Karachi |
| Action 1 | Set Pin β Pump controller / D0 = 1 |
| Action 2 | Delay β 30 s |
| Action 3 | Set Pin β Pump controller / D0 = 0 |
Example 2 β Daily Briefing Webhookβ
Scenario: Every weekday morning at 09:00, POST to a Slack webhook with the current temperature reading.
| Field | Value |
|---|---|
| Name | Daily Morning Briefing |
| Project | Office |
| Trigger | Schedule |
| Cron | 0 9 * * 1-5 |
| Timezone | Europe/London |
| Action | Call Webhook β POST to Slack incoming webhook |
| Cooldown | 0 (cron already limits frequency) |
Example 3 β Periodic Watchdog Checkβ
Scenario: Every 10 minutes, check if the greenhouse temperature (V1) is above 35 Β°C and send an alarm if so β but only during the day (07:00β21:00).
| Field | Value |
|---|---|
| Name | Greenhouse Overtemp Watchdog |
| Project | Greenhouse |
| Trigger | Schedule |
| Interval | 10 minutes |
| Condition | GreenhouseSensor V1 > 35 |
| Action | Send Alarm β "π‘οΈ Greenhouse overtemp: {{VW-XXXXX:V1}}Β°C" |
| Cooldown | 600 s (don't re-alarm within 10 minutes) |
| Active Time Window | 07:00 β 21:00 |
| Timezone | Europe/London |
Troubleshootingβ
Rule fires at the wrong time of dayβ
- Check the Timezone in Step 5. Cron is interpreted in that timezone β if it is left as
UTC,0 7 * * *fires at 07:00 UTC. - Verify your cron expression with a cron validator tool (e.g. crontab.guru).
Rule fires slightly lateβ
Schedule rules fire via a job queue. Under heavy server load, a firing may be a few seconds late β it will not be skipped, just delayed slightly.
Rule doesn't fire at allβ
- Check that the rule is enabled (green toggle on the rule card).
- Check Logs on the rule card. If the log shows "Condition failed", the trigger fired but conditions blocked the actions.
- If there are no log entries, confirm the server is healthy and check if the rule's Active Days or Active Time Window is filtering it out.
Template variable {{VW-XXXXX:pin}} shows raw placeholder in messageβ
- The schedule trigger has an empty snapshot (no device published data at fire time). Variables still resolve from the Redis pin cache (last received value). If the device has never sent data to that pin, the variable will not resolve and shows raw.
- Confirm the device has sent at least one reading to the referenced pin.
Cron fires more often than expected (e.g. both 0 and 7 matched Sunday)β
- In the 5-field cron format, both
0and7represent Sunday in the day-of-week field. VWire uses standard cron β0-7all inclusive, with0and7both = Sunday.
Summaryβ
| Property | Value |
|---|---|
| Fires when | Clock ticks past the configured interval or cron expression |
| Device data required | No β fires independent of any device |
| Cron format | 5-field: minute hour day month weekday |
| Cron timezone | Set in Step 5 Options (defaults to UTC) |
| Template variables | Resolved from Redis cache (last value seen per pin) |
| Available plans | Free, Pro, Pro Plus, Enterprise |