Live data from Hacker News

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

news.ycombinator.com

121–130 of 336 posts

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

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

Actions won’t run on repos with no activity for 60 days [0]. So make sure your action commits something to the repo to keep up activity.

This seems to meet OP’s use case as they have to commit state anyway.

[0] https://docs.github.com/en/actions/managing-workflow-runs/di...

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

#123
Retool Workflows is the way to go https://retool.com/products/workflows (see the 4 min demo on their site)

Flexibility to write custom code and alerting logic, but no headache of managing your own infrastructure

Disclaimer: I previously worked at Retool :)

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

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

At least for a while before I moved to self-hosted systemd timers, if you were running jobs near 0:00 UTC, the delay was often so long that your job wouldn't run at all. I had weeks of jobs literally not running at all before bailing on GitHub actions for this sort of thing. It was disappointing, but I'm now happier with my current setup.

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

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

I've just created a similar setup last week: 1. Cloud function, uses Puppeteer 2. Cloud scheduler for triggering cloud function 3. Cloud storage for data persistence

Costs around 1 Euro a month, I had a similar setup for free in Heroku before.

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

#129

Any cheap vps linux box will have cron and mail sending utils installed and ready to go.

Some boxes come with systemd, which has its own scheduler, but not cron. This is not a big deal but I was somewhat confused the first time I saw it.

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

#130
I co-founded Airplane.dev, which a lot of companies use as a much simpler, serverless, user-friendly alternative to cron: https://www.airplane.dev/schedules

We have companies running hundreds of concurrent schedules on our platform. Send me a note at ravi@airplane.dev if you'd like to chat about it.

Post reply on HN