# This is required for vixie-cron (man cron)# Check http://superuser.com/questions/264528/problem-with-random-in-crontab/264541#264541SHELL=/bin/bash# Auto renew Let’s Encrypt certs, two times a day at a random minute.# https://gist.github.com/ahmedelgabri/cba569863cfed73eeee2614d28a020040*/12***/etc/bin/certbot-renew.sh>/dev/null2>&1# Disk space monitor*/10 **** /etc/bin/diskspace.sh >/dev/null 2>&1#*/30 * * * * /etc/bin/diskspace-media.sh >/dev/null 2>&1# Check rclone mount health***** /usr/bin/rclone-directory-check.sh >/dev/null 2>&1# Backup to gdrive03***bash/usr/bin/backup.sh>/dev/null2>&1# Prune rclone logs every night54***rm/var/log/rclone/*.log*>/dev/null2>&1# Database heartbeat***** bash /etc/bin/check-db.sh >/dev/null 2>&1# Database size heartbeat*/3 **** bash /etc/bin/diskspace-db.sh >/dev/null 2>&1# Streaming API check***** bash /etc/bin/check-streaming.sh >/dev/null 2>&1
# Mastodon related50***RAILS_ENV=production/home/mastodon/.rbenv/shims/bundleexecrakemastodon:media:clear100***RAILS_ENV=production/home/mastodon/.rbenv/shims/bundleexecrakemastodon:push:refresh150***RAILS_ENV=production/home/mastodon/.rbenv/shims/bundleexecrakemastodon:feeds:clear# Fetch new users0 */4 * * * cd /home/mastodon/suomalaiset-mastodon-kayttajat && php /home/mastodon/suomalaiset-mastodon-kayttajat/fetch.php > /dev/null 2>&1
# Prune mastodon stuff to save disk space0*/12***bash/etc/bin/mastodon-prune.sh>/dev/null2>&1# Index search results periodically0*/4***bash/etc/bin/mastodon-build-search-index.sh>/dev/null2>&1# Check sidekiq health***** /bin/bash -l -c 'cd /home/mastodon/live && bash /etc/bin/check-sidekiq.sh'>/dev/null 2>&1# Build ElasticSearch index00***/bin/bash-l-c'cd /home/mastodon/live && bash /etc/bin/mastodon-build-search-index.sh'>/dev/null2>&1
Server status and monitoring
The admin gets a phone call from Better Uptime automation if anything mentioned on the status page goes down, by the minute.