Forum: Ruby on Rails cron job to execute ruby script - HELP

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1e2dd87a31c5d3e07adc9efa375f4dc4?d=identicon&s=25 rph (Guest)
on 2007-02-25 23:26
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 -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

Or does it not work like that?  I would appreciate any help!
This topic is locked and can not be replied to.