en
Language
  • en
  • de
  • fr
  • es
  • br
  • ru
  • jp
  • kr
AI translation
  • cs
  • hu
  • it
  • pl
  • nl
  • tr
  • ae
  • se
  • ua
  • id
  • vn
  • cn
  • th
  • ro
  • bg
  • dk
  • fi
  • no
  • gr
  • il
  • ee
  • eu

Cron configuration

cron

It is very important that rake tasks are NOT run by root. It will cause failure due to insufficient permissions.

Here is an example of a complete setting. Let's say you are running Easy Redmine under user easy. you will need to use relevant paths. The commands are:
View active crons crontab -u easy -l
Editing crontab -u easy -e
Apply changes sudo service cron reload

Example for running cron every 5 minutes:
*/5 * * * *             /home/easy/scripts/easy_scheduler.sh &> /dev/null

/home/easy/scripts/easy_scheduler.sh
#!/bin/bash -l

LOG_FILE="/home/easy/current/log/easy_scheduler_rake.log"

echo "$(date '+%Y-%m-%d %H:%M:%S') start rake" >> ${LOG_FILE}
cd /home/easy/current && bundle exec rake easyproject:scheduler:run_tasks RAILS_ENV=production >> ${LOG_FILE}
echo "$(date '+%Y-%m-%d %H:%M:%S') end rake" >> ${LOG_FILE}

/home/easy/scripts/easy_scheduler.sh has to be an executable:
sudo chmod +x /home/easy/scripts/easy_scheduler.sh

Don't hesitate to search the internet for a more precise manual to set up cron on your server. It is not an exclusively Easy Redmine required function.

Try Easy Redmine in 30 days free trial

Access all features, SSL protected, no credit card required.