One cron job to call Rake tasks managed by this plugin.
- When creating a new Scheduled Task, the field Interval must be set in minutes .
- RVM (Ruby Version Manager)
cd /opt/redmine
RAILS_ENV=production rake redmine:plugins:migrate NAME=redmine_cron
An example for Linux crontab to call our task manager every 15 minutes:
*/15 * * * * REDMINE_LANG=pt-BR RAILS_ENV=production RUBY_VERSION=2.2.2 /opt/redmine/plugins/redmine_cron/cronjob.sh
The shell variables:
- REDMINE_LANG sets the localized messages.
- RAILS_ENV sets the environment (development, test, production, ...)
- RUBY_VERSION sets the Ruby Version. The script calls RVM (Ruby Version Manager)
Everytime redmine:cron_job is called, this plugin will decide if the managed tasks must be run or not.