#lib/tasks/test.rakenamespace:cronododesc'Update all tables'task:hello=>:environmentdoputs"hello"endend
@michaelachrisco commented on GitHub (Apr 3, 2015):
``` Ruby
# cronotab.rb
require 'rake'
AppName::Application.load_tasks
class Test
def perform
Rake::Task['crono:hello'].invoke
end
end
Crono.perform(Test).every 5.seconds
```
With the rake task of:
``` Ruby
#lib/tasks/test.rake
namespace :crono do
desc 'Update all tables'
task :hello => :environment do
puts "hello"
end
end
```
Hi, i have put this code in my project. I am planning on running a email generation code using rake. But in the above example how do i run the crono gem. How do i make it run so every 5 sec it will give me a output of hello. Does the hello appear on the terminal?
Please help me out i am stuck at this for my project.
@karthikdc88 commented on GitHub (Oct 3, 2015):
Hi, i have put this code in my project. I am planning on running a email generation code using rake. But in the above example how do i run the crono gem. How do i make it run so every 5 sec it will give me a output of hello. Does the hello appear on the terminal?
Please help me out i am stuck at this for my project.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @plashchynski on GitHub (Mar 19, 2015).
@michaelachrisco commented on GitHub (Apr 3, 2015):
With the rake task of:
@plashchynski commented on GitHub (Apr 4, 2015):
@michaelachrisco Thank you, that's good variant. Closed by #15
@karthikdc88 commented on GitHub (Oct 3, 2015):
Hi, i have put this code in my project. I am planning on running a email generation code using rake. But in the above example how do i run the crono gem. How do i make it run so every 5 sec it will give me a output of hello. Does the hello appear on the terminal?
Please help me out i am stuck at this for my project.