Created
September 20, 2017 06:03
-
-
Save d6rkaiz/6c9fae9c482795bd00e2a909fd859a13 to your computer and use it in GitHub Desktop.
remove_remote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export RBENV_ROOT=$HOME/.rbenv | |
export PATH=/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/bin:/usr/local/bin:/usr/bin:/bin | |
export RAILS_ENV=production | |
cd /home/mastodon/live && bundle exec rake mastodon:media:remove_remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# m h dom mon dow command | |
50 8,18 * * * bash $HOME/bin/cron.sh 2>&1 | logger -t mastodon_cronjob |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cron.shを/home/mastodon/bin/に作成。
その後crontab -eを実行してcrontabに書かれた内容を参考に記入
(ここで書いてる時間のタイムゾーンはUTC)
実施結果は/var/log/messageに記録されます。