Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz
Created September 20, 2017 06:03
Show Gist options
  • Save d6rkaiz/6c9fae9c482795bd00e2a909fd859a13 to your computer and use it in GitHub Desktop.
Save d6rkaiz/6c9fae9c482795bd00e2a909fd859a13 to your computer and use it in GitHub Desktop.
remove_remote
#!/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
# m h dom mon dow command
50 8,18 * * * bash $HOME/bin/cron.sh 2>&1 | logger -t mastodon_cronjob
@d6rkaiz
Copy link
Author

d6rkaiz commented Sep 20, 2017

cron.shを/home/mastodon/bin/に作成。
その後crontab -eを実行してcrontabに書かれた内容を参考に記入
(ここで書いてる時間のタイムゾーンはUTC)

実施結果は/var/log/messageに記録されます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment