From 9c679e37418df13effaea43bd6c363420387e839 Mon Sep 17 00:00:00 2001 From: James Moore Date: Wed, 12 Apr 2017 21:57:04 -0700 Subject: [PATCH 1/2] simplified the cronjob section --- Running-Mastodon/Production-guide.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Running-Mastodon/Production-guide.md b/Running-Mastodon/Production-guide.md index 4c80d606..c2054a1d 100644 --- a/Running-Mastodon/Production-guide.md +++ b/Running-Mastodon/Production-guide.md @@ -282,15 +282,15 @@ This allows you to `sudo systemctl enable /etc/systemd/system/mastodon-*.service ## Cronjobs -I recommend creating a couple cronjobs for the following tasks: +There are several tasks that should be run once a day to ensure that mastodon is +running smoothly. As your mastodon user run `crontab -e` and enter the following -- `RAILS_ENV=production bundle exec rake mastodon:media:clear` -- `RAILS_ENV=production bundle exec rake mastodon:push:refresh` -- `RAILS_ENV=production bundle exec rake mastodon:feeds:clear` - -You may want to run `which bundle` first and copypaste that full path instead of simply `bundle` in the above commands because cronjobs usually don't have all the paths set. The time and intervals of when to run these jobs are up to you, but once every day should be enough for all. - -You can edit the cronjob file for the `mastodon` user by running `sudo crontab -e -u mastodon` (outside of the mastodon user). +``` +RAILS_ENV=production +@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:media:clear > /dev/null···································· +@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:push:refresh > /dev/null +@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:feeds:clear > /dev/null +``` ## Things to look out for when upgrading Mastodon From b8cd7a99d4792d365d3b15bcaf4990a1ed9ea534 Mon Sep 17 00:00:00 2001 From: James Moore Date: Thu, 13 Apr 2017 10:28:57 -0700 Subject: [PATCH 2/2] removed weird dot characters --- Running-Mastodon/Production-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Running-Mastodon/Production-guide.md b/Running-Mastodon/Production-guide.md index c2054a1d..ab01eb68 100644 --- a/Running-Mastodon/Production-guide.md +++ b/Running-Mastodon/Production-guide.md @@ -287,7 +287,7 @@ running smoothly. As your mastodon user run `crontab -e` and enter the following ``` RAILS_ENV=production -@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:media:clear > /dev/null···································· +@daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:media:clear > /dev/null @daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:push:refresh > /dev/null @daily cd /home/mastodon/live && /home/mastodon/.rbenv/shims/bundle exec rake mastodon:feeds:clear > /dev/null ```