Skip to main content

Timer

Triggers the flow at certain intervals based on the set options.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Payload - Data to be injected into the flow.

Output

  • Payload - Data that is injected into the flow.

Options

  • Seconds - The second(s) where the node will trigger. Choose "Every second" to trigger every second.
  • Minutes - The minute(s) where the node will trigger. Choose "Every minute" to trigger every minute.
  • Hours - The hour(s) where the node will trigger. Choose "Every hour" to trigger every hour.
  • Day of month - The day(s) of the month where the node will trigger. Choose "Every day of month" to trigger every day of the month.
  • Month - The month(s) where the node will trigger. Choose "Every month" to trigger every month.
  • Day of week - The day(s) of the week where the node will trigger. Choose "Every day of week" to trigger every day of the week.

How It Works

The Timer node uses cron-based scheduling to trigger flows at precise times:

  1. During flow initialization:
    • Converts time configuration to cron specification format (second, minute, hour, day, month, day-of-week)
    • Validates all time components are within valid ranges
    • Creates a cron scheduler with the generated specification
    • Starts the scheduler
  2. When scheduled time arrives:
    • Waits for robot to be in running state (if not already)
    • Creates a new message
    • Emits the input payload to trigger flow execution
  3. Continues triggering at each matching cron schedule
  4. On close, stops the cron scheduler

Requirements

  • Minute cannot be empty (0 means "every minute", specific value means that minute)
  • All time components must be within valid ranges:
    • Second: 0-59 or -1 for every second
    • Minute: 0-59 or -1 for every minute
    • Hour: 0-23 or -1 for every hour
    • Day: 1-31, 0 for every day, or -1 for wildcard
    • Month: 1-12 or 0 for every month
    • Day of week: 0-6 (Sunday=0), -1 for every day, or -2 for wildcard
  • Payload input should be provided (empty payload triggers error)

Error Handling

Error CodeDescriptionSolution
Core.Triggers.Timer.ErrOnCreateFailed to parse node configurationVerify node configuration is valid JSON
Core.Triggers.Timer.ErrSecond"invalid second"Set second between 0-59 or -1 for every second
Core.Triggers.Timer.ErrMinute"invalid minute" or "Minute is empty"Set minute between 0-59 or -1 for every minute
Core.Triggers.Timer.ErrHour"invalid hour"Set hour between 0-23 or -1 for every hour
Core.Triggers.Timer.ErrDay"invalid day"Set day between 1-31, 0 for every day, or -1 for wildcard
Core.Triggers.Timer.ErrMonth"invalid month"Set month between 1-12 or 0 for every month
Core.Triggers.Timer.ErrDayOfWeek"invalid day of week"Set day of week 0-6, -1 for every day, or -2 for wildcard
Core.Triggers.Timer.ErrOnMessageMessage parsing failedCheck input message format is valid
Core.Triggers.Timer.ErrInPayload"Input payload is empty"Provide a valid payload value

Usage Examples

Example 1: Daily Report at 8 AM

Run report generation every day at 8:00 AM:

[Timer]
Seconds: 0
Minutes: 0
Hours: 8
Day of month: Every day of month
Month: Every month
Day of week: Every day of week
Payload: {"reportType": "daily"}

[Generate Daily Report]

[Send Email]

Example 2: Hourly Data Sync

Sync data at the start of every hour:

[Timer]
Seconds: 0
Minutes: 0
Hours: Every hour
Day of month: Every day of month
Month: Every month
Day of week: Every day of week
Payload: {"action": "sync"}

[Fetch Latest Data]

[Update Database]

Example 3: Weekly Backup on Sundays

Run backup every Sunday at 2:00 AM:

[Timer]
Seconds: 0
Minutes: 0
Hours: 2
Day of month: Every day of month (when using day of week)
Month: Every month
Day of week: Sunday (0)
Payload: {"action": "backup"}

[Backup Database]

[Upload to Cloud Storage]

[Send Notification]

Usage Notes

  • When Continue On Error is enabled, errors are not caught even if Catch node is present
  • Timer uses cron format internally: second minute hour day month day-of-week
  • Use -1 or "Every" options for wildcard matching
  • Day of month and day of week interaction:
    • Use day of month wildcard (-1) when specifying day of week
    • Use day of week wildcard (-1 or -2) when specifying day of month
  • Timer triggers immediately when all conditions match
  • Multiple timers can coexist in the same flow
  • Timer waits for robot to be running before first trigger
  • Empty payload triggers error during execution (not at creation)
  • Timer continues running until flow is closed

Tips

  • For daily tasks, set specific hour and minute with "every day"
  • For hourly tasks, use "every hour" with specific minute
  • Use day of week for weekly schedules (0=Sunday, 1=Monday, ..., 6=Saturday)
  • Combine month and day for annual events (birthdays, anniversaries)
  • Test timer schedules in development before deploying to production
  • Use meaningful payloads to distinguish different timer triggers
  • Consider timezone settings when scheduling tasks
  • For simple repetitive tasks, consider Inject node instead
  • Document timer schedules in comments for future reference
  • Monitor first trigger to ensure schedule is correct
  • Use Timer for complex schedules; use Inject for simple intervals
  • Avoid very frequent triggers (every second) - use Inject with short intervals instead
  • Inject - For simple interval-based triggering
  • Catch - For handling Timer errors
  • Should Stop - For graceful shutdown
  • Stop - For terminating flow execution