Created Cron (markdown)

Lauri Ojansivu 2024-11-11 17:28:20 +02:00
parent 171fb37cb9
commit 1e5749c370

36
Cron.md Normal file

@ -0,0 +1,36 @@
WeKan has some memory leaks. This Cron script restarts wekan once every hour.
1) Edit /root/hourly.sh
```
sudo su
apt -y install nano cron
nano /root/hourly.sh
```
2) There add this text:
```
snap stop wekan.wekan
snap start wekan.wekan
```
3) Save and exit nano: Ctrl-o Enter Ctrl-x Enter
4) Edit cron:
```
export EDITOR=nano
crontab -e
```
There at bottom, add this line, that will restart WeKan hourly, and log to textfile:
```
0 * * * * /root/hourly.sh >> /root/hourly-log.txt 2>&1
```
5) Save and exit nano: Ctrl-o Enter Ctrl-x Enter
6) You can also list content of cron:
```
crontab -l
```