Live data from Hacker News

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

news.ycombinator.com

161–170 of 336 posts

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

#162
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-tutorial/blo...

This might also be a non-answer, but I've found myself using Integromat/Make or Zapier more and more for this type of work. It allows me to whip things up quickly and it can actually be approachable by non-technical people.

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

#163
I am in a very similar situation, what I ended up doing is use https://uptimerobot.com/ to monitor a specific route "HEAD https://example.com/update", which will update the data. It sends a HEAD request to the given path.

0 code on the cron side (cannot be simpler), and if you only monitor a single route per hour is free as well. AND you get a free UI on how the cron job went :)

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

#165
Easiest: Linux VM with cron. Pay for it, SSH into it, crontab -e, add your line, save file. Takes 5 minutes to set up. Moderately reliable. $1-$5/month depending on the provider

Cheapest: Any CI/CD service provider. Takes 20 minutes to set up. Not very reliable. Free

Next cheapest, least easy: complex proprietary serverless cloud functions to automatically trigger a task on a schedule. Takes an hour to set up. Most reliable. $0.30-$1.5/month

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

#166

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…

As a supabase enthusiast I take this as a direct challenge.

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

#167

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.

Overthinking it?

Your solutions costs $240/year.

There are solutions out there that would probably bring that under $20/year, and be more reliable than your VM that falls over when it's full of logs (at some indeterminate future date).

10x+ savings with greater reliability isn't "overthinking it", it's a greatly improved solution.

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

#169

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.

I do the same thing (as well as a couple of small docker containers, for example vaultwarden) on a GCP free tier VM.

Works great.

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

#170
My recommendation:

- (free) set up google sheets (not sure if this is required but that's what I do)

- (free) run an scheduled appscript bound to that sheet with regular intervals

- make it scrape the page (it's just javascript, you can do get requests, etc)

- Have it scrape a webarchive of the page you want to compare (not need to persist state or run a database, etc) and have it check the differences with the current page

- Have it send you an email if there's changes

It's totally free, takes no time to set up, and is relatively effortless. It can even send you alert on failures etc. I do something like this for my reading tracker where I crawl various sites (like amazon, etc) and RSS feeds for new releases of books/series I read and collect them in a dynamic spreadsheet.

Post reply on HN