Skip to main content
HookPulse provides powerful, out-of-the-box scheduling capabilities that allow you to automate workflows and webhooks at specific times, intervals, or based on solar events. With a flexible rule engine, you can create complex scheduling patterns with exclusions, time windows, and termination conditions.

What Is Scheduling?

Scheduling in HookPulse allows you to automatically trigger workflows or webhooks based on:
  • Time-based schedules (intervals, cron expressions, specific clock times)
  • Solar events (sunrise, sunset, dawn, dusk)
  • Rule-based exclusions (specific dates, days, months, time windows)
  • Termination conditions (maximum runs, expiration dates)
Schedules are associated with workflows or webhooks and execute automatically according to your configuration.

Scheduling Types

1. Interval Scheduling

Execute workflows/webhooks at regular intervals:
  • Interval Value: Number of units (e.g., 5)
  • Interval Period: Unit of time (second, minute, hour)
  • Is One-Off Task: Set to true for one-time execution, false for recurring
  • Examples: Every 5 minutes, every 2 hours, every 30 seconds
Use Cases:
  • Periodic data synchronization
  • Health checks
  • Regular reports
  • Cache refresh
  • One-time delayed execution
Example (Recurring):
Example (One-Time):

2. Cron Scheduling

Execute workflows/webhooks using cron expressions:
  • Cron Expression: Standard cron syntax (e.g., 0 9 * * * for daily at 9 AM)
  • Timezone: Specify timezone for accurate execution
  • Is One-Off Task: Set to true for one-time execution, false for recurring
  • Flexibility: Supports complex time patterns
Building Complex Cron Jobs: To build complex cron expressions easily, HookPulse provides a Cron Expression Builder in the Dashboard. Navigate to Add Schedule in your dashboard and use the out-of-the-box visual cron job builder to create complex cron expressions without manual syntax knowledge. The visual builder generates proper cron expressions that you can use via API or directly in the dashboard. Use Cases:
  • Daily reports at specific times
  • Weekly maintenance tasks
  • Monthly data processing
  • Complex recurring schedules
  • One-time scheduled execution
Example (Recurring):
Example (One-Time):

3. Clocked Scheduling

Execute workflows/webhooks at a specific date and time:
  • Clocked Run At: Exact datetime for execution
  • Timezone: Timezone for the scheduled time
  • One-Off Task: Automatically one-off (always executes once)
Use Cases:
  • One-time scheduled tasks
  • Future-dated operations
  • Scheduled maintenance windows
  • Time-specific events
Note: Clocked schedules are automatically one-off tasks. The is_one_off_task field is not required for clocked schedules as they always execute once and then complete. Example:

4. Solar Scheduling

Execute workflows/webhooks based on solar events:
  • Solar Events: sunrise, sunset, civil_dawn, civil_dusk, nautical_dawn, nautical_dusk, astronomical_dawn, astronomical_dusk
  • Latitude/Longitude: Geographic coordinates for accurate calculations
  • Offset Seconds: Optional offset to adjust timing
  • Is One-Off Task: Set to true for one-time execution, false for recurring
Use Cases:
  • Outdoor lighting control
  • Solar panel management
  • Weather-dependent operations
  • Location-based automation
  • One-time solar event triggers
Example (Recurring):
Example (One-Time):

5. Debounce Scheduling

Execute workflows/webhooks with debounce logic:
  • Debounce Seconds: Delay before execution (1 to 86,400 seconds)
  • Prevents Rapid Triggers: Waits for a quiet period before executing
  • Useful for: Event-driven workflows that need to wait for activity to settle
Use Cases:
  • User activity monitoring
  • File upload processing
  • Form submission handling
  • Event aggregation

Rule Engine

HookPulse’s powerful rule engine allows you to add conditions and exclusions to your schedules:

Time Window Rules

Restrict execution to specific time ranges:
  • Start Time: Beginning of allowed time window
  • End Time: End of allowed time window
  • Timezone: Timezone for the time window
Example:

Calendar Window Rules

Restrict execution to specific days and months:
  • Allow Days: Array of day numbers (1-31)
  • Allow Months: Array of month numbers (1-12)
Example:

Solar Window Rules

Restrict execution to solar event windows:
  • Solar Start Event: Beginning solar event
  • Solar End Event: Ending solar event
  • Latitude/Longitude: Coordinates for calculations
Example:

Exclusion Rules

Exclude specific dates from execution:
  • Exclusion Dates: Array of dates to skip
Example:

Termination Rules

Automatically stop schedules after conditions are met:
  • Max Runs: Maximum number of times to execute
  • Expire At: Specific date/time to stop execution
Example:

Schedule Status

Schedules can have different statuses:
  • active: Schedule is running and executing
  • inactive: Schedule is disabled
  • paused: Schedule is temporarily paused
  • completed: Schedule has completed (one-off tasks)
  • expired: Schedule has expired (termination rule met)

Template Variables in Schedules

Schedules support template variables in their initial context:
  • System Secrets: {{ #key }} - Access secrets from vault
  • Variables: {{ variable }} - Pass dynamic values
  • Initial Context: Variables available to the workflow/webhook when scheduled

Out-of-the-Box Features

HookPulse scheduling comes with: Multiple Schedule Types: Interval, Cron, Clocked, Solar, Debounce
Cron Expression Builder: Visual builder in Dashboard for creating complex cron expressions
Flexible Rule Engine: Time windows, calendar windows, exclusions, terminations
Timezone Support: Full IANA timezone support for accurate scheduling
Solar Calculations: Accurate solar event calculations based on coordinates
One-Off Tasks: Support for single-execution schedules (via is_one_off_task for interval/cron/solar, automatic for clocked)
Status Management: Active, inactive, paused, completed, expired states
Template Variables: Dynamic content in scheduled workflows via initial_context_template
Debounce Logic: Prevent rapid-fire executions
Automatic Calculations: Next run times calculated automatically

Example Scenarios

Daily Business Hours Report

Monthly Billing on 1st and 15th

Sunrise-Based Lighting Control

Hourly Health Check (Business Hours Only)

One-Time Scheduled Maintenance

One-Time Recurring Schedule (Interval)

Best Practices

  1. Choose Appropriate Schedule Type: Match schedule type to your use case
  2. Use Timezones Correctly: Always specify timezones for accurate execution
  3. Combine Rules: Use multiple rules for complex scheduling patterns
  4. Set Termination Conditions: Prevent infinite schedules with termination rules
  5. Test Schedules: Validate schedules in staging before production
  6. Monitor Execution: Track schedule execution and success rates
  7. Use Exclusion Rules: Exclude holidays and maintenance windows
  8. Optimize Intervals: Balance frequency with resource usage