Live data from Hacker News

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

news.ycombinator.com

241–250 of 336 posts

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

#241

I feel like maybe this problem was "solution first". A cronjob is a solution. For example, Supabase supports cronjobs, but it can't be used to take screenshots. This might be a non-answer, but if you just want "scheduled notifications of a website change", then you can use something completely purpose built for that. There is a Github action that does exactly this: https://github.com/yasoob/github-action-scraper-tuto…

You've also got changedetection.io ->(https://lemonade.changedetection.io/start), which can be selfhosted on a pi etc. I've used it myself to snipe the cheapest kimsufi server.

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

#247

If you are comfortable using AWS , You could us AWS Batch (free) with Spot Fargate jobs with Cloudwatch cron as the trigger . You only pay for the vcpu hours your job consumes https://aws.amazon.com/fargate/pricing/ , it’s a set it up once and forget it model. You could use lambda if your runtime is expected to always be less than 15 minutes Batch fargate jobs documentation - https://docs.aws.amazon.com/batch/latest/…

AWS’s Chalice framework also offers a high-level way to declare these scheduled functions (amongst other things): https://aws.github.io/chalice/

Haven't used Chalice, I've heard good things.

I use Zappa and it's great.

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

#250
post #150

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.

It's reasonable to call this the "easiest" way. It's certainly not the "cheapest, easiest" way, which is what the poster asked for. Many of the other options listed in this thread are free or within a rounding error of free. Some of them equally are not the "cheapest, easiest" because they're complex. But some of them pretty clearly meet both criteria (GitHub Actions comes to mind), and some of them might meet the cr…

As one of the sibling comments points out, you could set this up on a GCP free tier VM.
Post reply on HN