I have a working solution in node.js. Web scrapping using headless Chrome. It is a service that is called and returns what I need. But I need that service only now and then.
I used to use fly when there was a free Hobby plan that is not available any more. I would like you to help me find out if I am able to use fly either
just for an hour in the morning and an hour in the evening or
how many GB are needed for node.js machine? The script is just few lines of code
is there a way to attach temporarily volume to a machine? Or how does it work if the machine needs to download 10GB file then upload it somewhere and delete locally?
can I start machine just twice a day for one hour? Or have it started only on demand?
If I need help to set up such solution is someone willing to help me?
Fly has “scale to 0” when dealing with requests. But for specific cron-like activities, supercronic still the best for it.
The storage you pay is for the machine usage, if you don’t store data in the machine volume, should be fine for small amounts. As a reminder, you can increase the volume but can’t downscale it, so just increment as it needs.
One idea of setup is:
Private app (doesn’t handle external requests) via flycast so you can scale easily
Cron job via supercronic that calls (via curl or similar) said app and that’s it, should be well within the “free allowance”, if you need to call more times, or allow external calls, should be easy to modify as needed.
Big not as a full spec’d machine, but one that is able to handle chromium and whatever you need, is only “up” when you curl it, so 99% of the is “sleeping”.
Something has to be up to execute or coordinate stuff, the difference is that you will manage it or not. I don’t think fly has a “cron manager” directly, so it’s up to you to handle that.
You can drop the cron machine and use GitHub or GitLab actions to schedule an HTTP request to wake up your worker machine. That way you only pay for the 2 hours or so of the machine running.
It depends on how big your machine is, but generally should only take a few ms to start up. You probably have the wrong api key to your machine - impossible to tell w/o any errors.