Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/694e6f51-ab10-8009-8d6f-c671b3b99c63
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: はい!Supabase でも定期実行(バッチ/Cron)の仕組みはあり、他の主要なクラウドサービス(Google Cloud、Vercel、Cloudflare など)にもそれぞれの方法があります。以下に わかりやすい比較表 と 概要解説… === はい!Supabase でも定期実行(バッチ/Cron)の仕組みはあり、他の主要なクラウドサービス(Google Cloud、Vercel、Cloudflare など)にもそれぞれの方法があります。以下に わかりやすい比較表 と 概要解説 をまとめました。 ==== 定期実行ジョブとは、特定の時間・周期で自動的に処理を走らせる仕組みです(例:毎日深夜にデータ集計、1時間ごとに外部 API を呼び出す等)。これはバッチ処理やバックグラウンドジョブでも使われます。Zapier<ref>{{cite web|title=Zapier|url=https://zapier.com/blog/cron-job/|publisher=zapier.com|access-date=2025-12-27}}</ref> ==== ==== | | | | | | ==== | --- | --- | --- | --- | --- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==== ### ==== * 概要:Postgres の拡張機能 pg_cron を使って、SQL 内で Cron ジョブを管理。Supabase<ref>{{cite web|title=Supabase|url=https://supabase.com/modules/cron|publisher=supabase.com|access-date=2025-12-27}}</ref> * 方式:SQL で cron ジョブを登録 * 処理:DB クエリ実行 or Edge Function 呼び出し * 使いどころ:DB 周りのバッチ処理(例:古いデータ削除、集計更新) 📌 例: <syntaxhighlight lang="sql">SELECT cron.schedule('daily_cleanup', '0 0 '' '' *', $$CALL clean_old_rows();$$); </syntaxhighlight> ===== Supabase 単体で Cron は書けますが、外部 Scheduler と組み合わせて Edge Function を叩くことも一般的です(例:Cloudflare Cron Trigger で Supabase Edge Function 呼び出しなど)。Qiita<ref>{{cite web|title=Qiita|url=https://qiita.com/jackalope/items/64a10e498a354dd42c94|publisher=qiita.com|access-date=2025-12-27}}</ref> ===== ==== ### ==== * 完全マネージド Cron * HTTP / PubSub / App Engine / Cloud Function などにリクエスト実行可能 * 企業利用にも定評あり 📌 特徴: * 遅延や再試行制御、通知機能あり * IAM 連携が強い ===== - サーバーレス関数を Cron で実行 ===== * Git ベースで管理 * Next.js 等フロントと統合しやすいVercel<ref>{{cite web|title=Vercel|url=https://vercel.com/docs/cron-jobs|publisher=vercel.com|access-date=2025-12-27}}</ref> 📌 利点: * デプロイ済み関数に簡単にスケジュールを追加可能 * Frontend+Backend のフルスタック構成でも自然 ===== - エッジワーカーをスケジュール実行可能。Cloudflare Docs<ref>{{cite web|title=Cloudflare Docs|url=https://developers.cloudflare.com/workers/configuration/cron-triggers/|publisher=Cloudflare Docs|access-date=2025-12-27}}</ref> ===== * 軽量なタスクやエッジ処理(キャッシュ更新、API 合成)に強い 📌 Cron Triggers の特徴 * Workers を定期実行できるハンドラを設定 * エッジ実行なので高速 ==== | | | ==== | --- | --- | | | | | | | | | | | | | | | | ==== ✔ バッチ処理がDB 関連中心 → Supabase 内で完結可能 ==== ✔ GCP でいろんなサービスをまたぐ → Cloud Scheduler が安定 ✔ フロント中心 or Next.js → Vercel で Cron 予定と関数呼び出し ✔ エッジで API 呼び → Cloudflare Workers Cron 必要であれば、Supabase での Cron の設定例やステップバイステップ手順(SQL 登録 + Edge Function 連携など)も書けますので、用途を教えてください!
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)