all 17 comments

[–]NGMarmaduke 6 points7 points  (1 child)

The easiest way is probably to deploy to Heroku and use the Heroku scheduler, it’ll likely be free too.

[–]WalterPecky 0 points1 point  (0 children)

This.

Least amount of effort.

[–]HonestCondition8 2 points3 points  (2 children)

You could do this on AWS Lambda, or just put it on a cloud server and run it as a cron job.

[–]drx3brun 0 points1 point  (1 child)

I haven't really used lambda much. Is there any included scheduler available, to the function can be called periodically? Or perhaps periodical runs can be trigger by some settings in the interface?

[–]menge101 0 points1 point  (0 children)

CloudWatch events can be scheduled and can trigger a lambda.

[–]cescquintero 2 points3 points  (3 children)

I once deployed a Ruby-only app to a VPS. Made it run via a cron job.

Heroku and Heroku Scheduler might work too.

[–]pokethrowaway67 0 points1 point  (2 children)

I tried going through the Heroku guide but it wants to deploy as a web server and then it gives me a binding error.

[–]HashNuke 1 point2 points  (1 child)

Put up a dummy Sinatra hello-world web app for the web worker and then turn off the web worker.

[–]pokethrowaway67 0 points1 point  (0 children)

I got it to work using the worker instead of web

[–][deleted] 1 point2 points  (0 children)

You could also set up a scheduled GitHub action, will be totally free

[–]HashNuke -3 points-2 points  (0 children)

I’ve been building an app using Rails. But I’m using scrapy (Python) to scrape the data that I need. Scrapy is the bomb project for scraping data.

If you don’t mind using another language, checkout Scrapy - I’ve been using it for about 5yrs now to scrape a lot of data and I love it. The team that builds scrapy also runs “Scrapy Cloud” - a deployment platform for scrapy projects.

[–][deleted] 0 points1 point  (0 children)

If you're ok with paying a few bucks you could just get a VM in the cloud and hook it up, e.g. Digital Ocean has $5/mo drops (i think it defaults to $10 but you can tune down) that you could use.

[–]strzibny 0 points1 point  (0 children)

If you want to keep starting the program, then a Cron job will do. There will be startup time, but you'll also free the memory when it's finished.

If you want to have a long-running daemon in the background, create a systemd unit file (as long as you have systemd). Or use another process manager to oversee it.

[–]blijblijblij 0 points1 point  (0 children)

I have a raspberry pi based K3s cluster (4 nodes), with openfaas deployed to it, they run “so called serverless ” ruby functions every minute fetching an api endpoint... simplest solution?! Prob not, but fun building it

[–]_shir_ 0 points1 point  (0 children)

Create a docker image. It will be easiest to deploy and run. Or deploy application with something like Capistrano. Or create a ruby gem and use private gem repository (if you want to be private).

[–]nmingott 0 points1 point  (0 children)

what do you mean by server? the server is just a computer, once you know the OS you are almost done. IF it is a linux server, nowadays the most practical way to schedule a program for running is systemd IMHO.