You need to save file as UNIX formatted. But in your case it seems it was unicode with some strange characters in. Like 0x9c and 0x9d.
Thanks. I don’t know exactly the cause, but now we have a solution.
Kind regards
Hi,
I followed the thread just to create a simple task scheduler for restarting a Docker container on every 6 hours, but the ‘‘docker’’ command has not been found in crontab.
My sh script is so simple:
#!/bin/sh
docker restart container
This is the entry in crontab:
30 */6 * * * sh /storage/.config/scripts/container-restart.sh
This is the error :
CoreELEC crond[4594]: USER root pid 5492 cmd sh /storage/.config/scripts/container-restart.sh
CoreELEC crond[4594]: /storage/.config/scripts/container-restart.sh: line 3: docker: not found
Could please help me to resolve this issue.Thanks in advance
In file container-restart.sh add this on top before your commands
source /etc/profile
or use full path to the binaries.
Wooool
What a quick and helpful reply. It’s works wright now Thank you so much Sir. You saved my day.
By the way…I tried with the path but without any success.
I inserted this one:
PATH=/storage/.kodi/userdata/addon_data/service.system.docker/docker
Maybe
export PATH=$PATH:/storage/.kodi/addons/service.system.docker/bin