A bash script to stop a minecraft server and then restart it for an external backup process to take place.
- Set file path, start command, and screen name.
- On Linux make sure the file is executable: use chmod +x /path/to/script
- Manually execute, or schedule execution.
- update Cron Job: crontab -e
- Syntax for cron job: i. ii. iii. iv. v. /path/to/script
- Minutes (0 - 59)
- Hour (0 - 23)
- Day of the Month (1 - 31)
- Month (1 - 12)
- Day of the Week (0 - 7)