# What to use to do an action every minute?

**URL:** <https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011>\
**Category:** Rails\
**Created:** [April 26, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011 "2007-04-26T16:09:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [April 26, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011/1 "2007-04-26T16:09:01Z")

</div>

Hey,

I need to have a process running that will do something every minute  
(check value of some stuff). Is there something in Rails that I can use  
to do this?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [April 26, 2007, 4:17pm UTC](https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011/2 "2007-04-26T16:17:43Z")

</div>

On 26 Apr 2007, at 16:09, Joe P. wrote:

> I need to have a process running that will do something every minute  
> (check value of some stuff). Is there something in Rails that I  
> can use  
> to do this?

Depends on what you mean: if you want to update the user’s browser  
every minute when a certain page is loaded, you can use a periodical  
updater. If it’s a background process, you can use a cron tab and use  
“script/runner”, i.e. if it calculating values in the background  
without any visual feedback.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [April 26, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011/3 "2007-04-26T16:40:38Z")

</div>

> Depends on what you mean: if you want to update the user’s browser  
> every minute when a certain page is loaded, you can use a periodical  
> updater. If it’s a background process, you can use a cron tab and use  
> “script/runner”, i.e. if it calculating values in the background  
> without any visual feedback.
> 
> Best regards
> 
> Peter De Berdt

The “cron tab” sounds more like what I want to do. Time to search for  
information about that. Do you have an example of how to use a cron tab  
and script/runner for something like this?

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [April 26, 2007, 11:45pm UTC](https://www.ruby-forum.com/t/what-to-use-to-do-an-action-every-minute/93011/4 "2007-04-26T23:45:43Z")

</div>

On 26 Apr 2007, at 16:40, Joe P. wrote:

> The “cron tab” sounds more like what I want to do. Time to search for  
> information about that. Do you have an example of how to use a  
> cron tab  
> and script/runner for something like this?

[http://wiki.rubyonrails.org/rails/pages/HowToRunBackgroundJobsInRails](http://wiki.rubyonrails.org/rails/pages/HowToRunBackgroundJobsInRails)

Best regards

Peter De Berdt
