Would love something built in for cron jobs. Right now, I might be able to hack something together by creating a function in the functions directory (which is mapped to a URI), and finding some other means to call that uri on a schedule.
However, I feel like this would be perfect for a separate cron directory, with accompanying config for a schedule or means to enqueue a job. Of course, this opens a whole can of worms in regards to the infrastructure needed to support this, and the need for workers and queueing, etc.
I totally understand this probably falls below other higher priority tasks like authentication and Typescript, but just thought this would be needed by a multitude of apps down the road. Would be happy to help here.
Maybe I'm wrong, but I see this being out of the scope of the project
You could be right, and if so that’s fine. I was looking for something synonymous with Rails’ Active Job.
Yeah we definitely see a need for a product like this and may be working on something to fill it. 👀 If/when that product is available you can be sure that Redwood will have something like ActiveJob for integrating with it.
If you need something immediately check out https://www.easycron.com/ If you make a custom function like api/src/functions/custom.js and deploy to Netlify it will be available at /.netlify/functions/custom and can be called from the internet at large. You can setup a one-time call to that function or a recurring job on easycron and be good to go.
Before you all close this out, it could be a good addition to the RedwoodJS forum “Troubleshooting and How To” section.
hint hint 😉
Hi all. I ported this conversation over the forum so others can find the recommendation from Rob.
https://community.redwoodjs.com/t/cron-how-to-and-feature-request/214
Closing out. Thanks!
just leaving this for future people who search - you can add cronjobs in github actions - https://www.swyx.io/writing/github-scraping/
Most helpful comment
Yeah we definitely see a need for a product like this and may be working on something to fill it. 👀 If/when that product is available you can be sure that Redwood will have something like ActiveJob for integrating with it.
If you need something immediately check out https://www.easycron.com/ If you make a custom function like
api/src/functions/custom.jsand deploy to Netlify it will be available at/.netlify/functions/customand can be called from the internet at large. You can setup a one-time call to that function or a recurring job on easycron and be good to go.