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:
| Preset | Cron Expression | Description |
|---|---|---|
| Every hour | 0 * * * * | At minute 0 of every hour |
| Every 2 hours | 0 */2 * * * | Every 2 hours |
| Every 6 hours | 0 */6 * * * | Every 6 hours |
| Daily at 9 AM | 0 9 * * * | Every day at 09:00 |
| Daily at noon | 0 12 * * * | Every day at 12:00 |
| Daily at 6 PM | 0 18 * * * | Every day at 18:00 |
| Weekdays at 9 AM | 0 9 * * 1-5 | Monday to Friday at 09:00 |
| Every Monday at 9 AM | 0 9 * * 1 | Every Monday at 09:00 |
| 1st of month at 9 AM | 0 9 1 * * | 1st of every month at 09:00 |
Custom Configurationβ
Execution Frequencyβ
Select the basic frequency type:
| Frequency | Description |
|---|---|
| Hourly | Execute every N hours |
| Daily | Execute at specified time each day |
| Weekly | Execute on specified days of the week |
| Monthly | Execute 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β
| Character | Description | Example |
|---|---|---|
* | Any value | * * * * * every minute |
, | List | 0 9,18 * * * at 9 AM and 6 PM |
- | Range | 0 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β
| Option | Description | Range |
|---|---|---|
| Interval Value | Numeric value | 1-999 |
| Unit | Time unit | Minutes, Hours, Days |
Examplesβ
| Configuration | Description |
|---|---|
| 30 minutes | Execute every 30 minutes |
| 2 hours | Execute every 2 hours |
| 1 day | Execute once daily |
Difference from Cronβ
| Feature | Fixed Interval | Cron |
|---|---|---|
| Configuration complexity | Simple | Flexible but complex |
| Execution time | Relative to last execution | Fixed time points |
| Use cases | Monitoring, polling | Scheduled 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:
- Select date
- 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β
- Select trigger type as Event Trigger
- Select event type as Webhook
- Save the subscription to get Webhook URL and secret
Webhook Informationβ
After creation, you can obtain:
| Information | Description |
|---|---|
| API Endpoint | Webhook URL for receiving requests |
| Signing Secret | HMAC-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β
| Option | Description |
|---|---|
| Repository | Git repository address (owner/repo format) |
| Branch | Branch to monitor (optional, defaults to all branches) |
Use Casesβ
- Automatic code review after commits
- Automated test execution
- Documentation updates
π‘ Selection Recommendationsβ
By Scenarioβ
| Scenario | Recommended Trigger |
|---|---|
| Daily reports | Cron Schedule |
| Real-time monitoring | Fixed Interval |
| Temporary tasks | One-time Schedule |
| System integration | Webhook |
| CI/CD | Git Push |
By Frequencyβ
| Frequency | Recommended Trigger |
|---|---|
| Per minute | Fixed Interval |
| Per hour | Fixed Interval or Cron |
| Per day | Cron |
| Per week/month | Cron |
| On-demand | Webhook |
β οΈ 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
π Related Documentationβ
- Creating Subscriptions - Complete creation process
- Activity Timeline - View execution results