-1

how to running file ruby in whenever, in this case i'm not using rails. If in example rails code, i'm only must running this code and it's work :

example in rails :

every 3.hours do
  runner "MyModel.some_process"
end

but if i want to running file with extenstion .rb without rails, how do that :

example similiar code like this :

 every 3.hours do
   runner "ruby test.rb"
 end

thanks before

tardjo
  • 1,594
  • 5
  • 22
  • 38

1 Answers1

1

Use command instead of runner:

every 3.hours do
  command "ruby test.rb"
end

Hope this helps.

ptierno
  • 9,534
  • 2
  • 23
  • 35