you could create a script stopping the service and restarting it
e.g. a file named cmx-restart.sh in the e.g. /pi/CumulusMX directory - or whatever your path to CMX is
inside it would look something like
#!/bin/sh
#
### restart CMX
#
systemctl stop cumulusmx
sleep 10
systemctl restart cumulusmx
run manually with e.g. sudo sh cmx-restart.sh (from the directory the script resides in)
run periodically with an entry in /etc/crontab
something like below would run the job/script every Sunday
* * * * 7 root sh /pi/CumulusMX/cmx-restart.sh
this is assuming that the cumulusmx script called to start the service contains the start of mono - and that the stop section also stops mono
(not knowing how you run CMX as a service and what the service script looks like)
Thanks Gyvate! Appreciate the help.
I think the CMX service was set up the official way following the instructions :
Running MX as a Linux systemd"serviceWhen I stop cumulusmx i appears that mono-service.exe stops as well (according to htop).
Your post is timely as I was looking up cron, crontab cron job from a beginner's perspective.
What i"ve learned so far:
Definitely an unusual way to edit a config file. You don't use a text editor like kate or geany, you launch the editor thusly: contab -e and will be asked to choose an editor.
I wimped out and chose nano.
You will also have to decide if you want to use crontab as user or as root. I gather each has their own onfig file somewhere.
If you are using crontab to restart a service then using a crontab as user will fail ( not enough permissions) .
Crontab also seems fussy about specifying a full path to commands or scripts. Sometimes you have to specify root as user on the command line but sometimes not.
Definitely will try your script. Thanks once again.