Reputation: 4728
I was looking at railscast http://railscasts.com/episodes/168-feed-parsing?view=asciicast where the author is pulling the rss feed in the database through rails console by typing
FeedEntry.update_from_feed("http://asciicasts.com/episodes.xml")
now this is working fine for the first time but how to do this every 24 hours ? How to use cron here ?
Thanks
Upvotes: 1
Views: 49
Reputation: 23556
You can use whenever
gem as @dimuch said, but also you can run cron with this command:
$ rails runner 'FeedEntry.update_from_feed("http://asciicasts.com/episodes.xml")'
Upvotes: 1