My question is, if I set a task for 72 hours in the future, will a worker be active for that entire 72 hours? (I'm concerned about this as Heroku charges by the hour)
Yes, it will be up all time. Delayed job continuously pings the database to see if there any job in its queue.
And, regarding the best option i think i rather put one column knows as valid_upto
and put the date till will be active. I only signins (or whatever) to only those user which has created_at
dates less then or equal to valid_upto
date. And, periodically may be once in month i will run one cron job to remove invalid
users.
And, like @leesungchul suggested, you can use that, that looks cool.