Run some logic in app at desired time based on DB record

I need to run some logic in my rails app (for example process some
records in DB) at some time. I can not just use cron for this because
the time is set by admin and is stored in DB. How is better to do this?

Take a look at simpleworker.com . It’s probably the easiest way to do
this.