How can I add cron job to `wrangler.json` file?
I used svelitekit framework template and hosted to workers.
I see this in my
wrangler.json
file:
How can I add cron job to that file? How can I extand that file to cron job?17 Replies
where can I place this code?
Probably a question for SvelteKit people, I don't know if they allow setting things like cron triggers and from the original post, it seems they control the whole worker
I shim it in manually, but note that this only works with deployed Workers/wrangler dev
It won’t run when using Svelte’s own Dev Process
GitHub
authrora/src/worker.ts at main · helloimalastair/authrora
Authentication and Authorization at the Edge. Contribute to helloimalastair/authrora development by creating an account on GitHub.
How about like this?
I got this from gpt:
That looks like it might work? Then you just need to point your main towards that, instead of the sveltekit output
Is this working?
Yes, I have this deployed right now
Then I might use that method
@HardlyWorkin', hey just a suggestion, this method works too:
after multiple trial failed, it is working now 🎉

@Hello, I’m Allie! you are the svelte guy, right? Do you know how to setup trpc?
I mean, I do use Svelte in my own projects, but I wouldn’t say I’m an expert at it. As for tRPC, I’m afraid I haven’t used it before, so I wouldn’t know any more about setting it up than you
it is oaky, I mean I looked up the project you provided, you seems have experiences in Svelte a lot
Not really, other than a few sandbox projects with 1-2 files, this was actually my first larger project with Svelte(Kit). But thank you for the vote of confidence!
Actually, nvm, WDOL is also written in SvelteKit… point still stands though, I’m definitely no expert!
hey I found this one: https://github.com/ottomated/create-o7-app
GitHub
GitHub - ottomated/create-o7-app: An opinionated CLI for creating t...
An opinionated CLI for creating type-safe Svelte apps. - ottomated/create-o7-app