Background Jobs & Table Hooks
HosteDay Background Jobs and Table Hooks let you run asynchronous tasks and automated workflows in the background without slowing down API responses for your users.
Why Use Background Jobs & Table Hooks?
When a user creates an order or updates a record in your database, your API response should return immediately without waiting for emails, push notifications, or external HTTP calls to finish. HosteDay offloads these operations to the background right after database changes commit:
- Table Hooks: Attach automated actions to table data events (
insert,update,delete) directly from the dashboard with zero code. - API Job Dispatching: Trigger background jobs programmatically via
/api/jobs/dispatch. - Automatic Background Image Compression: Whenever an image is uploaded via
POST /api/file/upload(for example,https://my-app.hosteday.com/api/file/upload), a dedicated background job automatically compresses and optimizes it without delaying the upload response.
Prerequisites
To use Background Jobs and Table Hooks in your App:
- Your App's plan must include the Jobs feature (visible under Features & Services on your App card at dash.hosteday.com).
- Firebase (FCM v1) is only required if you want to use Push Notification hooks (configured in the Push Notifications tool); Email and Webhook hooks work directly without Firebase.
Background Jobs & Automation Guides
| Guide | Description |
|---|---|
| Table Hooks & Automation | Connect table events (insert, update, delete) to Email, Push Notifications, and signed Webhooks (X-Hosteday-Signature). |
| Dispatching Background Jobs via API | Trigger background jobs programmatically via POST /api/jobs/dispatch with authentication headers and rate limits. |