I’m developing a website (with Rails 3.1) where limited set of ‘writers’ are able to write post. ‘Moderators’ should accept (or decline) the post and schedule the publishing. Until this moment is the development process pretty basic.
There are two publish moments each day. Accepted posts will be placed in some kind of queue. Each day at 10:00am and 4:00pm the oldest accepted post must be published. However, I need also to be able to ** manually set** a date and time when the post going live.
What’s the best way to achieve the result? Cron? Background Jobs?
So…
1) have an
accepted_atfield, which you can also set manually; it’s the ‘time to go live’.2)
3) have a whenever job at 10am and 4pm to run a rake task