mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Worked on README.md to add cleanup instructions
This commit is contained in:
17
README.md
17
README.md
@@ -286,9 +286,9 @@ sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
## 5. Database Maintenance
|
||||
Create and save bash script below.
|
||||
Name it cleanup.sh
|
||||
Make it executable.(modify /path/to/file/ to the correct path)
|
||||
- Create and save bash script below. (Modify /path/to/file/ to the correct path)
|
||||
- Name it cleanup.sh
|
||||
- Make it executable.
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
@@ -319,15 +319,18 @@ sudo systemctl start meshview-web.service
|
||||
echo "Database cleanup completed on $(date)"
|
||||
|
||||
```
|
||||
chedule running the script on a regular basis.
|
||||
In this example it runs every night at 2:00am
|
||||
Open scheduler
|
||||
- Schedule running the script on a regular basis.
|
||||
- In this example it runs every night at 2:00am.
|
||||
|
||||
Open scheduler:
|
||||
```bash
|
||||
sudo crontab -e
|
||||
```
|
||||
Add schedule to the bottom of the file (modify /path/to/file/ to the correct path)
|
||||
Add schedule to the bottom of the file (modify /path/to/file/ to the correct path):
|
||||
```bash
|
||||
0 2 * * * /path/to/file/cleanup.sh >> /path/to/file/cleanup.log 2>&1
|
||||
```
|
||||
|
||||
Check the log file to see it the script run at the specific time.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user