|| at Mar 27, 2012 at 6:56 am
For new custom rack task you have to write rake file under the location
In that sample.rake file
desc "This task is back-end ruby script added for cron job"
task :cron => :environment do
# put some logic.
Go to your console put the command #> bundle exec rake -D
It will return rake tasks which are used in your project.
For example, here you will get your task
This task is back-end ruby script added for cron job
Run it using #> bundle exec rake cron
andrea longhi wrote in post #1053442:
I'm writing a nice gem which incorporate a few rake tasks, but I can't
find a way to add my custom tasks to the application rake list, if the
app is rails 2.x. I googled for a while but without any luck... any
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.