1
3 Comments

Free option to execute a JavaScript function periodically

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

on June 20, 2023
  1. 1

    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 :)

  2. 1

    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.

    1. 1

      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

Trending on Indie Hackers
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 58 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 28 comments Codenhack Beta — Full Access + Referral User Avatar 21 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 20 comments 🚀 Get Your Brand Featured on FaceSeek User Avatar 18 comments Day 6 - Slow days as a solo founder User Avatar 16 comments