无法从rails 2.3.5中的gem(0.9.7)到localhost:3000获得结果

时间:2016-07-02 07:49:42

标签: ruby-on-rails ruby-on-rails-2

 #my rake task

    namespace :send_digest_email do
     desc "send digest email" 
     task :send_digest_email => :environment do             
        @sender="govind.shawas20@gmail.com"             
        recipient= "govind.mietcse@gmail.com" # recieprnt
        @school = School.all
            @school.each do |s|
            MultiSchool.current_school = School.find s.id
            # to send mail  
           FedenaEmailer::deliver_send_custom_mail(@sender,recipient)                                             
        end 
     end
  end

我的schedule.rb文件

   every 2.minutes do
     rake 'send_digest_email:send_digest_email',
    :environment => 'development'
  end

   every :reboot do 
     rake 'send_digest_email:send_digest_email',
     :environment => 'development'
   end

#run命令开始工作。命令是

  1. whenever --update-crontab store

     [write] crontab file updated

  2. crontab -l

   # Begin Whenever generated tasks for: store @reboot /bin/bash -l -c     'cd /home/rank/gvs/new_rank/vendor/plugins/rank_gvs_customization &&
   RAILS_ENV=development rake send_digest_email:send_digest_email
   --silent'       
   0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58
   * * * * /bin/bash -l -c 'cd /home/rank/gvs/new_rank/vendor/plugins/rank_gvs_customization &&
   RAILS_ENV=development rake send_digest_email:send_digest_email
   --silent'

#End每当生成任务时:store

我跑去检查cron是否正在运行?

   1.service cron status
   cron start/running, process 924

但我没有通过cron收到任何邮件。

当我做rake -T并运行rake任务而不是收到邮件。

0 个答案:

没有答案