Live data from Hacker News

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

news.ycombinator.com

231–240 of 336 posts

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

#232

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.

cheapest linode is $5. If you want to save more, vultr.com has an ip6 only for $2.50.

These are just the "reputable" places, there's tons of small players where you can get a tiny VM for $10 for a year.

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

#234

Fly.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.

A maximum frequency of once per hour unfortunately.

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

#235
post #231

okay, why can't you just plug it in /etc/crontab ? If you're just scraping, you don't even need a public ip, and since you're writing this, I assume you own a PC..

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

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

#236
post #231

okay, why can't you just plug it in /etc/crontab ? If you're just scraping, you don't even need a public ip, and since you're writing this, I assume you own a PC..

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?

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

#237

Earlier quoted context omitted.

I exclusively use Lambda with Cloudwatch Rules for all the crons I write these days. It just works out of the box.

You should check out EventBridge Scheduler. Just released last month and seems like the go-to solution for such things going forward. I especially like the "run once at this time in the future" feature.

That’s neat! I remember hacking that together at an old job using step functions with a “pause until Timestamp” step.

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

#238
post #12

Github actions FTW! > https://docs.github.com/en/actions/using-workflows/events-th... I remember seeing a couple projects shared before, using this technique to scrape sites with GHA

This works great! I do this in one of my projects if you need a reference.

https://github.com/patrickgalbraith/rageagain/blob/master/.g...

Post reply on HN