# Auto-Update Database At A Specific Time: Possible?

**URL:** <https://www.ruby-forum.com/t/auto-update-database-at-a-specific-time-possible/139850>\
**Category:** Rails\
**Created:** [June 8, 2008, 4:17am UTC](https://www.ruby-forum.com/t/auto-update-database-at-a-specific-time-possible/139850 "2008-06-08T04:17:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lottario](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de053/32.png) [@lottario](https://www.ruby-forum.com/u/lottario)\
**Post date:** [June 8, 2008, 4:17am UTC](https://www.ruby-forum.com/t/auto-update-database-at-a-specific-time-possible/139850/1 "2008-06-08T04:17:26Z")

</div>

Well, I’ve been looking around, and I can’t seem to find anything  
remotely close to what I want to do (maybe I’m looking in the wrong  
places?). What I need (or rather, will need, since my app isn’t at this  
point yet. I’d just like to start writing out the code for it) is to  
automatically update attributes for every user at a specific time each  
day. Doing this at a login or an action is… well, I guess its doable,  
but it makes far more sense do simply update it at a specific time of  
day, each day. Is this even possible with Rails (everything else that I  
could ever need to do seems to be, so I don’t see why this wouldn’t be  
🙂 )? If not, any suggestions on how I could go about this (just point  
me towards something that can do it, and I can hopefully handle the  
rest)?

Thanks very much in advance for any help 🙂

---

<div class="post-metadata">

**Author:** ![lottario](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de053/32.png) [@lottario](https://www.ruby-forum.com/u/lottario)\
**Post date:** [June 8, 2008, 9:40am UTC](https://www.ruby-forum.com/t/auto-update-database-at-a-specific-time-possible/139850/2 "2008-06-08T09:40:19Z")

</div>

write whatever code you need into the models to perform these updates.  
then write a rake task to call these methods. finally, using cron (or  
some other similar system) execute the rake task at whatever time, and  
in whatever frequency you need.
