Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. # list existing cron jobs for redmine user
  2. crontab -u redmine -l 2>/dev/null >/tmp/cron.redmine
  3.  
  4. # add new job for recurring tasks if it does not exist
  5. if ! grep -q redmine:email:receive_imap /tmp/cron.redmine; then
  6. echo '*/1 * * * * cd /home/redmine/redmine && bundle exec rake redmine:email:receive_imap host=imap.mapazdrowia.pl port=993 ssl=true username=task2@mapazdrowia.pl password=3yxAHh1bQ0x unknown_user=ignore no_permission_check=0 no_account_notice=true project=mz tracker=bug RAILS_ENV=production > /home/redmine/redmine-email.log 2>&1' >>/tmp/cron.redmine
  7. crontab -u redmine /tmp/cron.redmine 2>/dev/null
  8. fi
  9.  
  10. # remove the temporary file
  11. rm -rf /tmp/cron.redmine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement