Welcome Guest | Login

how to use cron to run a RUBY app

Hi,

I have a ruby app that runs perfectly on windows xp using ruby2exe and windows task scheduler.

however i need it to run on hosting rails to complement with my rails app.

How do i use the cron web interface?

i saw a command to run bar but i am not too sure what to type.

In my ruby app, i also have some puts statements. I hope that is not an issue?


Thank you.

2008-01-01 10:19 AM

These are my steps

I have 3 .rb files in a folder

they are /folder/init.rb
        /folder/widget.rb
        /folder/sqlconnector.rb

i have place this line on the top of all 3 files.

#!/usr/bin/env ruby

i have also changed all 3 files from 0644 to 0744

Next i went to the advanced version of the cron manager and put in

15 * * * *

./folder/init.rb

i also supplied my email.

However, i received nothing in my email.

Have I done anything wrong?

Thank you.

2008-01-01 10:47 AM

When I ran the script manually, I found some syntax errors and also the cron job was not set properly. I have made the required changes in the cron tab. Please look into the script and rectify the errors.

2008-01-01 10:59 AM

Regards,
Rahul

Hello Guest! In order to post you must be an active client with us, please log in or sign up today!