我已经为问题提醒写了一个脚本
cd /var/www/redmine
/usr/local/rvm/gems/ruby-2.2.5/wrappers/rake reminder:exec RAILS_ENV="production
但是在运行上面的脚本时遇到错误
/usr/local/rvm/gems/ruby-2.2.5/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
rake aborted!
Don't know how to build task 'reminder:exec' (see --tasks)
/usr/local/rvm/gems/ruby-2.2.5/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
答案 0 :(得分:0)
rake任务似乎是由redmine_mail_reminder插件添加的。由于无法找到任务,您可能没有正确安装此插件(或根本没有)。
您也可能不在正确的目录中。要使rake任务起作用,您必须更改为Redmine的根目录,即包含app
,lib
和plugins
目录以及Gemfile
的目录
最后,Redmine本身可以在不使用插件的情况下使用Redmine本身附带的不同rake任务发送提醒:
bundle exec rake redmine:send_reminders days=7 RAILS_ENV="production"
有关详细信息,请参阅RedmineReminderEmails。