I came up with a different solution. I set up a second netlify site that connects to a smaller repo which only includes a lambda functions file with data.
I used windows task scheduler to run a cmd file with my node and git commands in it:
- fetch data
- update a file with the data and the lambda functions
- commit
- push
I have 2 folders in my commit: public & functions
Public just has a dummy index.html page
Functions has my lambda function with the body as the data.
My app now uses the endpoint created with the lambda functions in the second site, and my schedule only runs 3 times a day.