Live data from Hacker News

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

news.ycombinator.com

61–70 of 336 posts

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

#62
post #57

AWS 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

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

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

#63
post #26
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

AFAIK, scheduled GitHub workflows stop running after a while. But when that happens, GitHub will send you an email with a big green “Continue running workflow” button.

I've got a couple projects like this, that mostly just create bundles of other source projects that I'm not involved with. Creating a windows installer, or docker image for projects that don't have that integrated. It's kind of annoying that they will stop in several weeks when there's no project changes.

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

#64
post #37
post #26

Earlier quoted context omitted.

AFAIK, scheduled GitHub workflows stop running after a while. But when that happens, GitHub will send you an email with a big green “Continue running workflow” button.

I use crons to keep my Docker containers fresh, and have never hit this. But the cron commits to the repo, so I wonder if they’re flagging repos with crons but no commits recently?

Definitely... It seems to be in 4-6 week timeframe... I'd thought about making the cron update references in the repo, but hadn't gone through that as of yet.

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

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

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

#66
post #23

Earlier quoted context omitted.

Yes yes yes. I came to post the exact same thing then saw this =)

Eh. I tried to do Chromium/Puppeteer based scraping this way. Building a Dockerfile took ages due to the low compute. (Rust was a non-starter). I also had (foolishly) only bought the Pi with 2GB instead of 8GB so RAM was an issue. Disk was super slow. I'm not sure how viable this is, especially with how hard it is currently to source a Pi, let alone its computation/memory constraints.

That's really deviating from the nature of the "cheapest, easiest way to host a cronjob" question. If the OP has that kind of requirement, he won't get good answers.

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

#69
post #23

Raspberry Pi at home if you don't have a home server already. Or some low spec cheap vps.

Yes yes yes. I came to post the exact same thing then saw this =)

i run it on my NAS at home, one of the reasons is that it does not have a PUBLIC IP of one of the providers that is blocked on my scraping target.
Post reply on HN