I'm actively using all of the above approaches.
Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
131–140 of 336 posts
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#132Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#133To store data you’d use FireStore and/or Storage.
Both free for your use case (probably)
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#134I do a lot of web scraping, and Lambdas are very useful for web scraping since their IPs can change for each request.
For deployment, you can just do `serverless deploy` or set up a GitHub action each time you push to main.
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#135Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#136Most folks here are focusing on the scheduling part, but change detection means you need some way to persist state (or have a long running process that keeps state in memory). While you could do FaaS (e.g. AWS Lambda) + another service for state (e.g. S3/RDS/EFS), that seems like overkill. Even today I would still do it the old way: store state in a filesystem (maybe SQLite if you have more complex needs), and config…
I think the cheapest "cheaty" way to store data for free would be to pollute tracking sites. Open an account at some company, change your mailing address every hour, etc.
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#137EDIT: after reading the other solutions in this thread I'm blown away by how much people are over thinking and over engineering this. KISS people.
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#138Most folks here are focusing on the scheduling part, but change detection means you need some way to persist state (or have a long running process that keeps state in memory). While you could do FaaS (e.g. AWS Lambda) + another service for state (e.g. S3/RDS/EFS), that seems like overkill. Even today I would still do it the old way: store state in a filesystem (maybe SQLite if you have more complex needs), and config…
I mean, you don’t have to dockerize it, and I would use S3 or Dynamo for state, but otherwise it’s a pretty simple solution and it can run entirely in the free tier on AWS. It’s way better than managing your own host, especially when you consider that you get monitoring, alerting, logging, etc for free. EventBridge is just the standard AWS thing for triggering stuff (in this case, a cron schedule)—don’t let the branding scare you.
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#139AWS Lambda and Azure Functions both support timer triggers and probably round down to $0/ month if your job only runs for a few seconds an hour
Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?
#140Fly.io's Machines support cron jobs. You just hand them a Dockerfile and a schedule, and you'll be within their free tier. https://fly.io/docs/machines/working-with-machines/#create-a... See the `schedule` parameter.