diff options
| author | Yuval Adam <_@yuv.al> | 2022-11-30 11:07:26 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2022-11-30 11:07:26 +0200 |
| commit | b8d74f16c6db6feac98fa69701dbb9a822707c7b (patch) | |
| tree | f430d789efeb11d1bdd34c447d2d3d8e4a8d6d83 /cron-cf/src | |
| parent | 4334073a927b28daf9f3539d9f027d6d345d805c (diff) | |
Initial cron-cf
Diffstat (limited to 'cron-cf/src')
| -rw-r--r-- | cron-cf/src/index.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cron-cf/src/index.ts b/cron-cf/src/index.ts new file mode 100644 index 0000000..59538fb --- /dev/null +++ b/cron-cf/src/index.ts @@ -0,0 +1,32 @@ +/** + * Welcome to Cloudflare Workers! This is your first scheduled worker. + * + * - Run `wrangler dev --local` in your terminal to start a development server + * - Run `curl "http://localhost:8787/cdn-cgi/mf/scheduled"` to trigger the scheduled event + * - Go back to the console to see what your worker has logged + * - Update the Cron trigger in wrangler.toml (see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers) + * - Run `wrangler publish --name my-worker` to publish your worker + * + * Learn more at https://developers.cloudflare.com/workers/runtime-apis/scheduled-event/ + */ + +export interface Env { + // Example binding to KV. Learn more at https://developers.cloudflare.com/workers/runtime-apis/kv/ + // MY_KV_NAMESPACE: KVNamespace; + // + // Example binding to Durable Object. Learn more at https://developers.cloudflare.com/workers/runtime-apis/durable-objects/ + // MY_DURABLE_OBJECT: DurableObjectNamespace; + // + // Example binding to R2. Learn more at https://developers.cloudflare.com/workers/runtime-apis/r2/ + // MY_BUCKET: R2Bucket; +} + +export default { + async scheduled( + controller: ScheduledController, + env: Env, + ctx: ExecutionContext + ): Promise<void> { + console.log(`Hello World!`); + }, +}; |
