Skip to main content

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
No device data

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 CaseExample
Morning routineEvery weekday at 07:00 β†’ turn lights on (set D0 = 1)
Nightly shutdownEvery day at 22:00 β†’ power off all relays
Periodic sensor checkEvery 30 minutes β†’ check temperature pin, alert if too high
Daily reportEvery day at 09:00 β†’ send email summary via webhook
Irrigation cycleEvery day at 06:00 and 18:00 β†’ run pump for 10 seconds
Keep-alive pingEvery 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.

FieldDescription
Interval (minutes)Run every N minutes. Used when no cron expression is provided.
Cron expressionOptional. Overrides the interval. Standard 5-field cron syntax.
One or the other

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.

ValueFires
5Every 5 minutes
30Every 30 minutes
60Once per hour
1440Once per day (at start time β€” use cron for a specific time of day)
Interval: time-of-day control

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​

ExpressionMeaning
0 7 * * *Every day at 07:00
0 22 * * *Every day at 22:00
0 7 * * 1-5Monday–Friday at 07:00
0 8,18 * * *08:00 and 18:00 every day
*/30 * * * *Every 30 minutes
0 9 * * 1Every Monday at 09:00
0 0 1 * *First day of every month at midnight
*/5 9-17 * * 1-5Every 5 minutes, 09:00–17:00, Mon–Fri
Timezone matters

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
info

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:

ActionExample
Set Pin ValueTurn on a relay (D0 = 1) at 07:00 and add a second rule to turn it off at 22:00
Toggle PinFlip a pin's state on each schedule fire
Send Notification"Good morning β€” daily routine activated"
Call WebhookPOST to an external API (daily report, heartbeat)
Send EmailDaily summary email to the team (Pro+ plan)
DelayBetween two Set Pin actions β€” e.g. run pump for 10 s then stop

Example β€” pump on for 10 seconds:

OrderActionDetails
1Set Pin ValueD0 = 1 (pump on)
2Delay10 seconds
3Set Pin ValueD0 = 0 (pump off)

Step 5 β€” Options​

OptionNotes for schedule rules
CooldownRarely needed for schedule rules β€” the schedule itself controls frequency. Set only if you have multiple schedule-type rules with overlapping timings.
TimezoneImportant 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 WindowCan 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 DaysUseful 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.

FieldValue
NameIrrigation Cycle
ProjectGarden
TriggerSchedule
Cron0 6,18 * * *
TimezoneAsia/Karachi
Action 1Set Pin β€” Pump controller / D0 = 1
Action 2Delay β€” 30 s
Action 3Set 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.

FieldValue
NameDaily Morning Briefing
ProjectOffice
TriggerSchedule
Cron0 9 * * 1-5
TimezoneEurope/London
ActionCall Webhook β€” POST to Slack incoming webhook
Cooldown0 (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).

FieldValue
NameGreenhouse Overtemp Watchdog
ProjectGreenhouse
TriggerSchedule
Interval10 minutes
ConditionGreenhouseSensor V1 > 35
ActionSend Alarm β€” "🌑️ Greenhouse overtemp: {{VW-XXXXX:V1}}Β°C"
Cooldown600 s (don't re-alarm within 10 minutes)
Active Time Window07:00 – 21:00
TimezoneEurope/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 0 and 7 represent Sunday in the day-of-week field. VWire uses standard cron β€” 0-7 all inclusive, with 0 and 7 both = Sunday.

Summary​

PropertyValue
Fires whenClock ticks past the configured interval or cron expression
Device data requiredNo β€” fires independent of any device
Cron format5-field: minute hour day month weekday
Cron timezoneSet in Step 5 Options (defaults to UTC)
Template variablesResolved from Redis cache (last value seen per pin)
Available plansFree, Pro, Pro Plus, Enterprise