© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago
Drew

Data Intensive Weekly Cron Job

Each week, I want to select all users in a table, then for each, gather several data points and send an email containing that data. According to this documentation: https://supabase.com/blog/postgres-as-a-cron-server , this is a good fit for a database function on Supabase ("Sending welcome emails. If you use an email provider with an HTTP API, then you batch emails to that service. Write a function that selects all your signups yesterday, then sends them to your favorite transactional email service. Schedule it every day to run at midnight.") Is this the best approach? What's more intuitive to me, as someone not so familiar with SQL and more familiar with JS, is to use a postgress cron function to trigger an edge function. Can you point me to an example of a database function that iterates over a table and makes a query and http request for each row? Is that the superior way to accomplish this?
Supabase
Postgres as a CRON Server
Running repetitive tasks with your Postgres database.
Postgres as a CRON Server
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Cron Job Pricing
SupabaseSSupabase / help-and-questions
13mo ago
cron.job_run_details
SupabaseSSupabase / help-and-questions
7mo ago
Cron job in job table but not executing
SupabaseSSupabase / help-and-questions
14mo ago
Authentication from CRON job -> Edge Function
SupabaseSSupabase / help-and-questions
2mo ago