Use Cases
Schedule Database Backups
Trigger automated database backups on a cron schedule using TrigRun. Copy-paste API examples for PostgreSQL, MySQL, and MongoDB backup endpoints.
Trigger your database backup endpoint every night without managing crontab or servers. TrigRun calls your backup URL on schedule, retries on failure, and alerts you if anything goes wrong.
The problem
You have a backup endpoint (or a serverless function that runs pg_dump) and need it called reliably at 2 AM every night. Running a cron daemon means maintaining a server just for scheduling. If the server goes down, backups stop silently.
The TrigRun solution
| Setting | Value |
|---|---|
| Schedule | 0 2 * * * (daily at 2:00 AM) |
| Method | POST |
| Timeout | 300 seconds (backups can be slow) |
| Retries | 3 attempts with exponential backoff |
Create via API
Create via CLI
Why TrigRun over crontab
- No server to maintain — no VM running just to trigger a backup
- Automatic retries — if your DB server is temporarily unreachable, TrigRun retries with backoff
- Failure alerts — get notified via Slack, Discord, or email if the backup fails after all retries
- Encrypted secrets — API keys stored in TrigRun's vault, never exposed in logs
- Execution history — see every backup run with status, duration, and response for 30 days
Common variations
| Variation | Schedule | Expression |
|---|---|---|
| Nightly at 2 AM | Every day | 0 2 * * * |
| Every 6 hours | Four times daily | 0 */6 * * * |
| Weekly Sunday night | Once per week | 0 3 * * 0 |
| First of every month | Monthly | 0 2 1 * * |