Creating Schedules
This guide walks you through creating and managing Schedules in Hooklistener.
Creating a New Schedule
- Navigate to Schedules: Go to the Schedules section in your Hooklistener dashboard
- Click "Create Schedule": Open the schedule creation wizard
- Follow the 3-step wizard:
Step 1: Basics
- Name: Give your schedule a descriptive name (e.g., "API Health Check", "Daily Data Sync")
- Status: Choose whether to start the schedule as active or inactive
Step 2: Timing
Configure when your schedule should run using a cron expression.
Quick Presets: Use one of the common presets:
- Every minute:
* * * * * - Every 5 minutes:
*/5 * * * * - Every hour:
0 * * * *or@hourly - Every day at midnight:
0 0 * * *or@daily - Every week:
0 0 * * 0or@weekly
Custom Cron: Or enter your own cron expression using the standard 5-field format:
* * * * *
│ │ │ │ │
│ │ │ │ └─── Day of week (0-7, Sunday = 0 or 7)
│ │ │ └───── Month (1-12)
│ │ └─────── Day of month (1-31)
│ └───────── Hour (0-23)
└─────────── Minute (0-59)
Cron Macros: Supported shortcuts:
@hourly- Run every hour@daily- Run daily at midnight@weekly- Run weekly on Sunday at midnight@monthly- Run on the first day of each month
Step 3: Request Configuration
Configure the HTTP request details:
HTTP Method: Select GET, POST, PUT, PATCH, or DELETE
Target URL: Enter the complete URL to request (e.g., https://api.example.com/health)
Timeout: Set request timeout in seconds (1-120, default: 10)
- Use shorter timeouts for quick health checks (5-10 seconds)
- Use longer timeouts for data processing endpoints (30-120 seconds)
Headers: Add custom HTTP headers as key-value pairs
- Example:
Authorization: Bearer token123 - Example:
Content-Type: application/json
Request Body (for POST, PUT, PATCH):
- Enter the body content (JSON, text, etc.)
- Make sure to set appropriate
Content-Typeheader
Alert on Failure: Toggle to receive notifications when the schedule fails
Expected Status Codes: Define which HTTP status codes indicate success
- Default:
200 - Add multiple codes:
200, 201, 204 - Use ranges for flexibility
Expected Response Keyword (optional): Enter a keyword that must appear in the response body
- Example:
"status": "ok" - Example:
success - Useful for validating that the response contains expected content
- Create: Click "Create Schedule" to finish
Editing a Schedule
To modify an existing schedule:
- Click on the schedule in your dashboard
- Update any fields (timing, request details, validation rules)
- Click "Save" to apply changes
Changes take effect immediately. If you modify the cron expression, the next run time will be recalculated automatically.
Activating and Deactivating
You can pause a schedule without deleting it:
- Toggle the active switch in the schedule details view or on the schedule card
- Active schedules execute at their scheduled times
- Inactive schedules are paused and won't run until reactivated
Deleting a Schedule
To permanently remove a schedule:
- Open the schedule details
- Click "Delete" in the top-right corner
- Confirm the deletion
Note: Deleted schedules cannot be recovered. If you might need the schedule again, consider deactivating it instead.
Viewing Execution History
Each schedule displays:
- Last Run: Timestamp of the most recent execution
- Last Status: Success or failure indicator
- Last Message: Details about what happened (e.g., "status 200", "unexpected status 500")
- Next Run: When the schedule will execute next
Review this information to monitor your schedules and troubleshoot any issues.
Monitoring and Troubleshooting
Common Failure Messages
- "request failed: :econnrefused": The target server refused the connection (check URL and server availability)
- "unexpected status 500": The server returned an error (check server logs)
- "missing keyword xyz": The response didn't contain the expected keyword (verify keyword and response format)
- "timeout": The request took longer than the configured timeout (increase timeout or optimize endpoint)
Best Practices
- Start with inactive: Create schedules as inactive first to verify configuration before activating
- Test the endpoint: Ensure your target URL is accessible and returns expected responses
- Use appropriate timeouts: Set timeouts based on expected response times
- Validate responses: Use expected status codes and keywords to catch subtle failures
- Monitor regularly: Check execution history periodically to catch issues early
- Use descriptive names: Name schedules clearly so you can identify them at a glance
Limits and Constraints
- Maximum timeout: 120 seconds
- Minimum interval: No hard limit, but avoid excessively frequent schedules (sub-minute intervals should be used carefully)
- Organization scope: Schedules are private to your organization
- Cron validation: Invalid cron expressions will be rejected during creation