script/runner in rails 3

前端 未结 2 1506
被撕碎了的回忆
被撕碎了的回忆 2021-01-11 09:48

I have 2 jobs I would like to run and they are dependant on Models in my rails application. I added the ruby files in a separate folder called Jobs, that I have appended to

2条回答
  •  悲&欢浪女
    2021-01-11 10:12

    Use rails runner

    $ rails -h
    Usage: rails COMMAND [ARGS]
    ...
    runner       Run a piece of code in the application environment
    
    All commands can be run with -h for more information.
    

提交回复
热议问题