Live data from Hacker News

Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

news.ycombinator.com

291–300 of 336 posts

Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

#292

Can someone please enlighten me on what is the purpose of using an external Cron runner here? If I need to run the same job(s) for a long time, wouldn't it be simpler and cheaper to run a basic $5 VM on something like Linode?

rely dislike those 5$ VM comments

Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

#293
I'm still using the old way: "crontab -e" inside the same EC2 where I run the app. In case of failure I automatically send an email to me. This is the easiest scenario in case you already have an EC2 for some other things that is already running. Instead, from scratch (no EC2), I'd probably use Lambda.

Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

#295
post #260

There is no way you can do that reliably without a K8S multi-cloud cluster.

Not just a multi-cloud, but also managed kafka and a managed db across a multi-region deployment. Regions can fail, your job needs persistence and you need to maintain the state of the message in the db.. oh!! have you also thought about the right queue semantics? Do you want your job to trigger exactly one, at least one or at most once? What happens if the previous job is still running when it is time to trigger it…

It'd be literally impossible to deploy any of this lightweight, cloud-native architecture without at least 14 Terraform modules as well, maybe more (just to be safe).

Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

#296
post #91

> It is 2022, so I had thought it would be tremendously easy and cheap, but it seems no solution is easily implemented. You assume someone purchased hardware (preferably available anywhere on the planet), powered it up, set it up, connected it to the internet, then built the software to handle your very specific task, then put it online to do specifically what you want and for a close-to-free price? And you're shocke…

(Not Op) Yes. The task is specific but not all that unusual. In a world where startups seem to exist to solve every conceivable problem (including ridiculous “problems” that nobody has), it’s always interesting to find something that isn’t nearly solved.

Re: Ask HN: What is the cheapest, easiest way to host a cronjob in 2022?

#297
post #65

GCP Cloud Run with a schedule set to call the HTTP endpoint once an hour. Cloud Run will run any docker image, and give it a HTTPS URL. Scales to zero, allows running in the background for up to an hour. The benefit over FAAS is that you can run anything you want in the container, including multiple processes.

If you fit within the language/runtime restrictions, Cloud Functions and App Engine also both can be invoked with the same scheduler setup. We use Cloud Functions for monitoring all the time (schedule to call a function once per minute or so that scrapes some metrics from a third party API and pushes to a Prometheus gateway). Costs us something like $0.12/month and has been extremely reliable. We also run apps on App Engine when we can and there all you need to do is add a `cron.yaml` and you can invoke endpoints there easily and practically for free.
Post reply on HN