Live data from Hacker News

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

news.ycombinator.com

11–20 of 336 posts

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

#13
If you have a GCP, AWS, or Azure account already and know Javascript, you should be able to whip up a serverless cron task real quick. IMO the simplest setup is probably GCP via Firebase (which makes deployment super simple once you install the CLI): https://firebase.google.com/docs/functions/schedule-function...

You won't spend much at all, it's fractions of a penny per call and I think there's a free tier.

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

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

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

#18
post #6

AWS Lambdas could be used for this, you can trigger them on a time schedule using an event bridge.

Using their Python library called chalice was really easy to make cron style lambdas in Python in my experience. https://github.com/aws/chalice

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

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

I came to suggest the same thing.

I use their cronjob functionality to ensure my docker images are built daily and therefore in theory secure.

Post reply on HN