Report
I have a JavaScript function that reads from a webpage and updates Firebase. Need to run this periodically (once a day, the execution time is less than a minute). What will be the best free option to host this script and run it periodically
Create a docker container and deploy it to fly.io free tier. You can then either configure the system cron in docker, or use an npm package like https://www.npmjs.com/package/cron and just keep the app running on Fly.
Alternatively, get a NAS. I'd do this from my NAS :)
Let's assume your function takes exactly 1 minute to run, not less. That means 1 min / day, which translates to 30 minutes per month. Which also translates to 30 * 60 = 1800 seconds.
GoogleCloud (since you already you Firebase) offers way more than that for free, per month -- compute seconds I mean.
Where I'm going with this is, you can create a Node runtime Function in Google Cloud with your code and execute that automatically, daily, with a watcher.
Thanks. I am currently using the free Firebase Spark plan, looks like I need to upgrade to the Blaze plan to use Functions. I was trying to see if there are options without putting my credit card info