What if you moved this into a rake task as well?