A scheduled Trigger.dev job that keeps a Supabase project active by performing periodic writes against a dedicated table, preventing it from being paused due to inactivity.
- Scheduled keep-alive task backed by Trigger.dev v3.
- Inserts a row into a configured Supabase table on each cron tick.
- Automatically prunes the table once it exceeds a configurable row limit.
- Configuration driven entirely by environment variables.
- Bun runtime and package manager
- TypeScript
- @supabase/supabase-js
- @trigger.dev/sdk (v3)
- Bun >= 1.3 (developed with Bun 1.3.11)
- A Supabase project with a table whose columns all have default values and RLS disabled (or a permissive update policy)
- A Trigger.dev account and project
git clone <repository-url>
cd supabase-pause-prevention
bun installCopy .env.example to .env.local (used in development via dotenv) and
fill in the values:
| Variable | Description |
|---|---|
TRIGGER_PROJECT_ID |
Trigger.dev project identifier |
SUPABASE_PROJECT_URL |
Supabase project URL (e.g. https://<id>.supabase.co) |
SUPABASE_ANON_KEY |
Supabase anonymous API key |
SUPABASE_TABLE_NAME |
Target table used for keep-alive writes |
SUPABASE_TABLE_MAX_COLUMN_SIZE |
Maximum rows before the table is pruned |
CRON_EXPR |
Cron expression for the schedule (e.g. 1 3 * * 1,3) |
For production, configure the same variables in the Trigger.dev dashboard.
Start the Trigger.dev dev runner locally:
bunx trigger.dev@latest devDeploy to Trigger.dev:
bunx trigger.dev@latest deploy --skip-sync-env-varsSee the Trigger.dev CLI docs for more options.
This project is licensed under the MIT License. See LICENSE for details.