How to delete my searches every 10 minutes?

56 views
Skip to first unread message

faithfro...@gmail.com

unread,
Aug 25, 2012, 10:45:05 AM8/25/12
to whenev...@googlegroups.com

Hello everybody,
I need to remove all searches (all searches with all IDs) from my database every 10 minutes...
So this would be the path
http://nameofmysite.heroku.com/searches/1

How would you write the right code to do it?

Thanks

Javan Makhmali

unread,
Aug 26, 2012, 4:37:28 PM8/26/12
to whenev...@googlegroups.com
With Whenever, your schedule.rb would look something like,

every 10.minutes do
  runner "Search.delete_all"
end

But it looks like you're running on heroku and I don't believe it has native cron support so Whenever won't be much help.

-Javan


--
You received this message because you are subscribed to the Google
Groups "Whenever Gem" group and because you're awesome.
To post to this group, send email to whenev...@googlegroups.com
To unsubscribe from this group, send email to
whenever-gem...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/whenever-gem?hl=en

Reply all
Reply to author
Forward
0 new messages