Live data from Hacker News

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

news.ycombinator.com

21–30 of 336 posts

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

#24
post #8

You can checkout https://cronhub.io (I run it). Behind the scenes, it wraps a lambda function with EventBridge (so you can set schedule) and adds other goodies like notifications/alert (slack/email etc), metrics, notifications if job runs slow etc. Not free but basically you wrap your job in http endpoint and then we take care of the rest.

I think OP doesn't want to keep a machine running permanently. If you do that, adding your own crontab entry would be trivial as well.

Possibly. We do have paying customers who are using it so that they have better tracking, notifications and guarantee that the job is running (with metrics etc). But I hear you. For some devs, it may not be critical. I do have plans to allow adding your own code directly so that you don't have to come with an http endpoint.

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

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

Just note that they’re not guaranteed to be called precisely on time, e.g. my “every 15m” CRON job will be called every 15m _at best_, in practice… twice per hour.

This works perfectly for my case (content syndication for https://potato.horse), and I’m pretty happy with GH actions for this kind of stuff, but if you need something more precise, you might want to look somewhere else.

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

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

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

#27
Try https://render.com

The UI is excellent for this. You can probably find cheaper on Fly but probably not easier.

Even easier, maybe more expensive than Render:

https://www.zeplo.io/docs/schedule

You just hit a URL like so and it's done. zeplo.to/your_url.com?_cron=5|14|||*

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

#28
post #22

All free: * free-tier vps on GCP or Oracle Cloud * lambda job on AWS I have a cheap VPS I use for other things and just run my cron jobs there.

I don't know about the others, but AWS is not free and it's not cheap. There are ways to set alerts on budget overruns, but there is no foolproof way to limit monthly spending. Eventually you will configure something that goes out of control, or I was able to conceive of a few scenarios where a malicious third party could rack up charges for, e.g. S3 egress costs. Good luck contesting the charges more than once. I shut everything down and pulled out of AWS. I believe that Azure's free trial featured a hard cap, but still requires a credit card to open your account.

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

#29
You should check out Modal! Does much more than just cronjobs, but super easy and cheap: https://modal.com/docs/guide/cron. They have an example with a simple web scraper as well: https://modal.com/docs/guide/web-scraper

From their pricing example:

> You schedule a job to run once an hour for 15 seconds. This job uses 50% of one CPU core and 256 MiB of memory. This job will cost $0.016/day for the CPU, and $0.001/day for the memory, adding up to $0.017/day, or $0.51/month.

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

#30
I have a PowerShell script that collects some RSS and posts it to my journal.

Easiest way I found to do that was Azure Functions. Costs me about 35p per month. Mostly for storage for logs as far as I can tell. I'd sort that, but it's literally not worth the time it would take

Post reply on HN