From 1e5749c370fe43a6c6caaca49b1ed30b98fe33cc Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 11 Nov 2024 17:28:20 +0200 Subject: [PATCH] Created Cron (markdown) --- Cron.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Cron.md diff --git a/Cron.md b/Cron.md new file mode 100644 index 0000000..79bb1cd --- /dev/null +++ b/Cron.md @@ -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 +``` \ No newline at end of file