Starting ruby script on server's reboot

Hi

I’m using passenger + apache.
with this combination, how can I start my ruby script on server’s
reboot?
now I type “ruby myscript.rb run” whenever server reboot.

On Tue, Jun 23, 2009 at 4:47 PM, serenobs [email protected] wrote:

how can I start my ruby script on server’s reboot?

Like anything else – invoke it from a script in /etc/init.d .

(That is, of course, assuming *nix – Windows, no idea)


Hassan S. ------------------------ [email protected]

you can add your script to the cron tab
take a look at this screencast

thanks
Rajesh

Most modern crontab specifications support a @reboot meta-schedule.

A job tagged

@reboot /usr/bin/ruby /path/to/your/script.rb run

would run whenever the machine restarted.