Cron job to execute ruby script - HELP

I have a ruby script that gets data from two apis and caches it to a
file, and I want to execute it every 30 minutes. The script is located
in my script/ directory of my rails app. How can I setup a cron job
(what is the syntax) to execute this ruby script every 30 minutes?

I currently have this keep-alive job:

*/5 * * * * wget http://www.mysite.com/index -O - -q >/dev/null 2>&1

But someone helped me out with that one. Would it be:

*/30 * * * * ruby path/to/the/script/api_cache.rb -O - -q >/dev/null
2>&1

Or does it not work like that? I would appreciate any help!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs