Worker Templates
Built-in job types and custom handler patterns for Savannah Cloud workers.
Savannah Cloud includes a wide set of built-in workers, and you can also add custom handlers for application-specific logic.
Built-in job types
| Template | Job Type | Key payload fields |
|---|---|---|
| Send Email | send_email | to, subject, body |
| Send SMS | send_sms | to, message |
| Webhook | webhook | url, payload |
| Generate PDF | generate_pdf | template, data |
| Git Deploy | git_deploy | repo, branch |
| Stack Deploy | stack_deploy | project, stack |
| ML Threat Check | ml_check | payload, type |
Submit a job
curl -X POST http://localhost:8080/jobs \
-H "X-API-Key: sc_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"ID": "email-001",
"Type": "send_email",
"Payload": {
"to": "user@example.com",
"subject": "Welcome to Savannah Cloud",
"body": "Your account is ready."
},
"MaxRetries": 3
}'Custom worker patterns
Add a case in the worker switch and call your preferred downstream service.
case "send_email":
to := payload["to"].(string)
subject := payload["subject"].(string)
body := payload["body"].(string)
err = sendEmailViaResend(to, subject, body)
case "send_sms":
to := payload["to"].(string)
message := payload["message"].(string)
err = sendSMS(to, message)
case "webhook":
url := payload["url"].(string)
data := payload["payload"]
err = postWebhook(url, data)This keeps job implementations decoupled from the API layer and gives you a clean place to extend the platform.
Retry behavior
MaxRetries: 0→ one attempt onlyMaxRetries: N→ retries on failure up toNtimes- failed jobs are recorded with logs and status
- the dashboard exposes current attempts and error context
Built-in jobs are a good starting point, but custom domain-specific automation is supported by adding new handlers and registering new job Type values.