Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8985655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:22:27+00:00 2026-06-15T21:22:27+00:00

I have need to periodically run a background task in my rails app. I’ve

  • 0

I have need to periodically run a background task in my rails app. I’ve done some research and it seems that there is not a standard way to do this.

I don’t want to generate a new app context so a runner seems to be out of the question. I’d prefer not to run my own thread handler if I don’t have to. (It looks like this may be the most promising option at this point other than the below).

Using the whenever gem I am doing the following in schedule.rb:

every 15.minutes do
    command "curl http://127.0.0.1:3000/periodic"
end

This feels a little like a hack, but I can’t find anything that is more straightforward than this — Everything else I can find seems like a lot of effort for something seemingly basic.

I should note that this is an internal project and will be behind a firewall, and headless automated middleware, so there is low expectation that a user will ever be accessing this project directly.

Am I missing something or is background processing or timed events really just not supported out of the box with rails?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:22:28+00:00Added an answer on June 15, 2026 at 9:22 pm

    After some research, Amadan’s suggestion of a railtie may get me what I want here. As an ideal solution it isn’t perfect, though depending on the context (i.e. a publicly accessible rails project) this is the way to go. For the project I am working on it’s a little heavy handed, as I’m doing a rails app that is a bridge between two systems, running headless, with no user input behind a firewall.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to periodically run some code on app engine? I have
I have a process that needs to be run periodically - on a Rails
In my application I need to have periodically run background tasks (which I can
First some background, I have a python script that will be called periodically by
In my app I have need to trigger show some custom view when status
I have a need to write a GTK application in C that does some
I have an app that periodically downloads a very small text file (10 bytes)
We have a rather large library that we need to periodically import (and then
I have a zendframework project for which i need to run a script periodically
I have a reasonably complex macro that I need to run on multiple different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.