I have a rails app with a Location model, which has a rating, and a rating_count field. Now, I need to reset every Location‘s rating and rating_countattributes to 0 at a specific time everyday, lets say 12:00:00 UTC.
How would I accomplish this? I’m using the default sqlite3 databases.
The best option is to use cron. You can find tons of documentation out there!Although if you are running a Rails app you should check out whenever a pretty neat gem for managing cron jobs for your app!