Skip to content

Instantly share code, notes, and snippets.

@d6rkaiz d6rkaiz/cron.sh
Created Sep 20, 2017

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.