Skip to main content

Trigger Types

Subscriptions support multiple trigger types to meet different automation scenario requirements.


πŸ“… Cron Schedule​

Use Cron expressions to define complex execution schedules, suitable for tasks that need to run at specific times.

Quick Presets​

The system provides commonly used preset options:

PresetCron ExpressionDescription
Every hour0 * * * *At minute 0 of every hour
Every 2 hours0 */2 * * *Every 2 hours
Every 6 hours0 */6 * * *Every 6 hours
Daily at 9 AM0 9 * * *Every day at 09:00
Daily at noon0 12 * * *Every day at 12:00
Daily at 6 PM0 18 * * *Every day at 18:00
Weekdays at 9 AM0 9 * * 1-5Monday to Friday at 09:00
Every Monday at 9 AM0 9 * * 1Every Monday at 09:00
1st of month at 9 AM0 9 1 * *1st of every month at 09:00

Custom Configuration​

Execution Frequency​

Select the basic frequency type:

FrequencyDescription
HourlyExecute every N hours
DailyExecute at specified time each day
WeeklyExecute on specified days of the week
MonthlyExecute on specified days of the month

Hourly Configuration​

  • Hour Interval: 1-12 hours
  • At Minute: 0-59 minutes

Example: Execute at minute 30 every 2 hours β†’ 30 */2 * * *

Daily Configuration​

  • Execution Time: Select hour and minute

Example: Execute daily at 09:30 β†’ 30 9 * * *

Weekly Configuration​

  • Select Days: Multi-select Monday through Sunday
  • Execution Time: Select hour and minute

Example: Every Monday, Wednesday, Friday at 9 AM β†’ 0 9 * * 1,3,5

Monthly Configuration​

  • Select Dates: 1-31, or "Last day"
  • Execution Time: Select hour and minute

Example: 1st and 15th of each month at 9 AM β†’ 0 9 1,15 * *

Cron Expression Format​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ minute (0-59)
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ hour (0-23)
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of month (1-31)
β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ month (1-12)
β”‚ β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ day of week (0-7, both 0 and 7 are Sunday)
β”‚ β”‚ β”‚ β”‚ β”‚
* * * * *

Special Characters​

CharacterDescriptionExample
*Any value* * * * * every minute
,List0 9,18 * * * at 9 AM and 6 PM
-Range0 9 * * 1-5 Monday to Friday
/Step*/15 * * * * every 15 minutes

Timezone Note​

Cron expressions use your local timezone. The system displays the current timezone in the configuration interface.


⏱️ Fixed Interval​

Execute repeatedly at fixed time intervals, suitable for tasks requiring regular checks or monitoring.

Configuration Options​

OptionDescriptionRange
Interval ValueNumeric value1-999
UnitTime unitMinutes, Hours, Days

Examples​

ConfigurationDescription
30 minutesExecute every 30 minutes
2 hoursExecute every 2 hours
1 dayExecute once daily

Difference from Cron​

FeatureFixed IntervalCron
Configuration complexitySimpleFlexible but complex
Execution timeRelative to last executionFixed time points
Use casesMonitoring, pollingScheduled reports, planned tasks

πŸ• One-time Schedule​

Execute once at a specified date and time, suitable for temporary tasks or one-time needs.

Configuration Options​

Use the date-time picker to select execution time:

  1. Select date
  2. Select time (hour and minute)

Use Cases​

  • Scheduled report delivery
  • Timed reminders
  • Temporary data collection

Notes​

  • Subscription won't trigger again after execution
  • You can manually set a new execution time
  • Recommended to check results after execution

πŸ”” Event Trigger​

Trigger execution through external events, suitable for integration with other systems.

Webhook Trigger​

Receive HTTP requests to trigger execution.

Creating a Webhook Subscription​

  1. Select trigger type as Event Trigger
  2. Select event type as Webhook
  3. Save the subscription to get Webhook URL and secret

Webhook Information​

After creation, you can obtain:

InformationDescription
API EndpointWebhook URL for receiving requests
Signing SecretHMAC-SHA256 signing secret (optional)

Calling Methods​

Request without signature:

curl -X POST "https://your-domain/api/v1/webhooks/xxx" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'

Request with signature (recommended):

SECRET="your-webhook-secret"
BODY='{"key": "value"}'
SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)

curl -X POST "https://your-domain/api/v1/webhooks/xxx" \
-H "Content-Type: application/json" \
-H "X-Webhook-Signature: sha256=$SIGNATURE" \
-d "$BODY"

Using Webhook Data​

Use the {{webhook_data}} variable in your Prompt template to access request body data:

Received new alert notification:
{{webhook_data}}

Please analyze the alert content and provide handling recommendations.

Git Push Trigger​

Trigger execution on code push (in development).

Configuration Options​

OptionDescription
RepositoryGit repository address (owner/repo format)
BranchBranch to monitor (optional, defaults to all branches)

Use Cases​

  • Automatic code review after commits
  • Automated test execution
  • Documentation updates

πŸ’‘ Selection Recommendations​

By Scenario​

ScenarioRecommended Trigger
Daily reportsCron Schedule
Real-time monitoringFixed Interval
Temporary tasksOne-time Schedule
System integrationWebhook
CI/CDGit Push

By Frequency​

FrequencyRecommended Trigger
Per minuteFixed Interval
Per hourFixed Interval or Cron
Per dayCron
Per week/monthCron
On-demandWebhook

⚠️ Important Notes​

Execution Frequency Limits​

  • Minimum interval recommended is 1 minute
  • High-frequency execution consumes more resources
  • Consider task execution time to avoid overlap

Timezone Issues​

  • Cron uses local timezone
  • Be aware of time conversion for cross-timezone collaboration
  • System displays next execution time for confirmation

Webhook Security​

  • Recommended to use signature verification
  • Keep signing secrets secure
  • Rotate secrets periodically