Live data from Hacker News

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

news.ycombinator.com

271–280 of 336 posts

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

#271
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…

not so fast... young unicorns !! Where are you going to log the nasty errors when it fails.

You probably want to setup a self-hosted cloud-based remotely-managed splunk and ensure someone does the maintenance/upgrade for you (those can be challenging)

Have you properly setup your pager-duty ? I wouldn't want to miss one of the cron execution !!

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

#273
post #258
post #236

Earlier quoted context omitted.

That seems unlikely to be honest.. just grab an old one if you don't want to use your main one for it.. but if it's cron, its probably not so important that it can't survive missing a single run due to some reboot or whatever?

Electricity prices at the moment mean running an old PC 24/7 isn't the no brainer it used to be.

Not a no-brainer for sure, but depending on what PC it is, the costs can still be really low. Assuming 50 W power draw (you can get this much lower with cheap or free e-waste PC's like old Atom NUCs or thin clients, or a low-power laptop like an old MacBook Air) you're using 1.2 kWh per day. Even at current extreme electricity prices this will not really break the bank for most people.

Better, forget about running 24/7 and use rtcwake(8) to wake it up for an hour at night to perform the job and then go back to sleep. This will bring costs far into the negligible.

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

#275
post #136
post #108

Most 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 thought about AWS MQTT "IoT" as the pricing contains gems like a million MQTT packets for a dollar. You'd use a MQTT "retained message", push the current SHA1 hash of the page or whatever will fit (maybe only a CRC32 LOL), then connect an hour later to receive that message containing the hash. The cost would seem to be $1 per 5 years because AFAIK AWS meters on input and output... I'm not bored enough to audit the…

Hash isn’t nearly enough. Web pages love to generate random ids, cache busters, etc.

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

#276
post #253

Earlier quoted context omitted.

At this point I don't even know if this comment is satire or not.

I don't see how it's satirical. If you need a job to run, you need to handle the case of transient node failures. K8S helps alleviate this issue by allowing the job to be launched on any of a choice of nodes. Sure, cron is fine if you're just looking to rotate logs on the local machine, but if you want to reset your nuclear watchdog timer, you may want something more reliable :)

If you need a job to run, you need to handle the case of governments turning against you. A huge nuclear capable military and a top notch spy agency helps alleviate this issue by allowing missiles to be launched on any belligerent nations.

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

#277
post #172

I'm not sure what you mean when you say there is no easy solution... procure a small vm on Linode or your choice of provider for like $20/mo. SSH into it, set up the crontab to run your web scraping script. I could literally have that set up and running in 15 minutes flat. EDIT: 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.

Even better that $20/month on linode is a GCP free tier instance. For this case, I bet it would be free. https://cloud.google.com/free

Until Google kills it

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

#278

I'm not sure what you mean when you say there is no easy solution... procure a small vm on Linode or your choice of provider for like $20/mo. SSH into it, set up the crontab to run your web scraping script. I could literally have that set up and running in 15 minutes flat. EDIT: 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.

You can get a VM for way less for simple needs.

I have a VM from those lowendbox providers from a few years ago that costs $4 a YEAR - static IP, 256MB RAM/512MB virtual, 10GB storage, U18.04

I do not use it for anything serious, but it actually has had 99.9% uptime.

Again, with cheap providers there is a good chance they go belly up but for cronjob that should suffice.

For more serious cronjobs on the budget Hetzner is nice.

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

#279
post #90

Hey, this is still a WIP, but I'm building [redacted]. We wrap an open-source workflow orchestrator Temporal that offers "durable execution" with very detailed execution tracing and a bunch of recovery mechanisms. We offer a fully-managed Temporal cluster, hosted runtime (so you don't need to worry about provisioning/scaling workers), and offer version control integrations, CI/CD and dynamic config out of the box - s…

Just to know... why is it called [name redacted] instead of orchestration.cloud ?

They are two very different concepts which I see very often used interchangeably. Temporal is clearly about orchestration.

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

#280
Temporal and its ”schedule” feature is great - it handles backfill and you can set various policies [0].

We self-host, but they have a GA cloud offering now. [1]

As long as you use js/ts, go, python, php or java that is. For some jobs we wrap process execution - e.g running a powershell command.

[0] https://docs.temporal.io/concepts/what-is-a-schedule

[1] https://temporal.io/cloud

Post reply on HN