# Daily task

**URL:** <https://www.ruby-forum.com/t/daily-task/69478>\
**Category:** Rails\
**Created:** [September 21, 2006, 9:48am UTC](https://www.ruby-forum.com/t/daily-task/69478 "2006-09-21T09:48:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [September 21, 2006, 9:48am UTC](https://www.ruby-forum.com/t/daily-task/69478/1 "2006-09-21T09:48:03Z")

</div>

Hi all

user upload a file to my site  
i want run a daemon analyse file content, save to db(daily task)

my question is:  
how to run this daemon, it’s wrote by rake task or Linux OS stuff?  
any idea.

regards

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [September 21, 2006, 10:43am UTC](https://www.ruby-forum.com/t/daily-task/69478/2 "2006-09-21T10:43:07Z")

</div>

On 21/09/06, Joe B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> my question is:  
> how to run this daemon, it’s wrote by rake task or Linux OS stuff?  
> any idea.

I need to achieve something similar, and my initial approach was going  
to be to have a cron job that called the relevant rake task on a  
regular basis.

## My ideal approach would be to have some form of daemon that waits for data to arrive and then processes it, but at the moment the cron solution is much more achievable.

Dave M. (Schwuk)  
[http://schwuk.com](http://schwuk.com)

---

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [September 21, 2006, 11:49am UTC](https://www.ruby-forum.com/t/daily-task/69478/3 "2006-09-21T11:49:17Z")

</div>

You both can either use a cron job (set a script/runner or RAKE  
 line in crontab -e), or either using BackgroundRB. BRB is a  
bit heavy, but both works just fine.
