Live data from Hacker News

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

news.ycombinator.com

251–260 of 336 posts

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

#252

As someone who always missed failing cronjobs, I am using Airflow with Slack integration. I.e., every time the job finishes, I get a message. If the job fails, I also get a message.

It’s glorious. Post to a muted channel on success, post to a unmuted on on failure.

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

#254

EventBridge + AWS Lambda It's cheap as in free, thanks to the generous free tier.

isn’t the free tier only for one year?

Some services have a small "always free" tier too; S3, DynamoDB and Lambda all have enough free usage available for personal projects.

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

#256

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?

The motivation is some of the "serverless" offerings may be near free if you are only firing this say once a day and the script is very fast to run.

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

#257

Earlier quoted context omitted.

You really don't need docker for this.

It's true that you don't, but I can see the advantages. I have a Raspberry Pi that is natively running a scraper using headless Chromium and cron. It works great, except.... I ended up needing a virtual framebuffer. I got it working on the Raspberry Pi, but I got a new workstation and wanted to edit my script and test it there. I got cryptic errors that I needed to debug to understand they were framebuffer issues, th…

Why couldn't you keep editing your script in your Pi?

Isn't proposing Docker as a solution to this going nuclear?

I think there are some many cheaper things you can do to solve this.

For me this is absolutely no justification for Docker use in this scenario.

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

#258
post #236

Earlier quoted context omitted.

Because not everyone has a pc/home server they can just leave on 24/7

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.

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

#259
post #253

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

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

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

#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 again? Is it 15 minutes from start to start or end of previous to start of next? How about metrics? Is your process idempotent?

So, the right answer is 42 unicorns.

Post reply on HN