DEV Community

Discussion on: What's the simplest way to run a Ruby script in the cloud every so often?

Collapse
 
ryankilleen profile image
Ryan Killeen • Edited

I know it's not what you asked, but I'm curious about the nature of what the script's trying to achieve, sometimes recurring event type things can benefit from being redesigned.

Keep-alive or "ping this endpoint" type recurring things meant to cause side-effects aren't ideal, and the orgs have moved away from un-trackable, invisible Cron job type work.

Collapse
 
ben profile image
Ben Halpern

The scripts are definitely in the realm of "ping this endpoint" kind of scripts. I could see how this would be a problem at a certain scale, but for automating flows of my own the downside doesn't seem so troubling.

That's my defense of the idea, but I'd love some elaboration on your general concern.

Collapse
 
ryankilleen profile image
Ryan Killeen

The general concern is this:

Something that is necessary to the life of an app or process shouldn't live separate from it, both in codebase and infrastructure. That gets lost among teams / individuals. They tend to go undocumented, forgotten by time, and then you're dependent on something without realizing it. I've had to deal with lots of legacy migrations that get thwarted and delayed by something.

Typically there are better ways to achieve something set up like this. If it's a keep awake ping, there are almost always better ways of configuring Always Awake.

Sometimes it's unavoidable, it's possible that this doesn't fit your situation, and also maybe it isn't a critical thing. But if you can keep it closer to where it's necessary, future you / future devs will appreciate it being clearer, and it won't be an ambush when it's gone.