Basic Rails runner can (and should) run in the background I created at home for personal project. Enjoy!
- Rails (2.1 or above)
- Ruby (1.9 or above)
Just clone the git or download the file :)
$ git clone git@github.com:baradm100/simple-rails-runner.git
Just run using Rails runner
$ bundle exec rails runner runner.rb
# With args:
$ bundle exec rails runner runner.rb --eval "puts 'hi'" --timeout 0.1
Key | Explanation |
---|---|
--timeout | Set custom timeout for the loop, defualt is 2 second |
--eval | Running the value as code (using eval, please be careful) |
--log | Log file path (overwrite puts , print and p ) |
-D | Run the runner as a daemon (not compatible in windows) |