framework/config/crontab

9 lines
342 B
Plaintext

# Ensure cron knows where commands like 'su' and 'reboot' are located
PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH
# Start the Minecraft server after an OS reboot
@reboot su server -c '~/framework/script/init.sh'
# Reset and reboot the server every 24 hours (0 0 * * * / at 00:00)
0 0 * * * su server -c '~/framework/script/reset.sh' && reboot