This question will probably only make sense if you know about the whenever gem for creating cron jobs. I have a task in my schedule.rb like
every 1.day, :at =&g
For Whenever (0.9.2)
Whenever (0.9.2)
Use the @environment variable for environment check:
@environment
case @environment when 'production' every 1.minutes do rake "user:take_sample" end when 'development' every 1.minutes do rake "user:dev_sample" end end