So I am running libreelec and would like to run a script every time the pc boots and then every hour after.
I have a command that launches the script in a screen and running it works fine.
I have set this up as a cron job with @reboot and every hour, but the script does not run.
I have asked it to output to a log file and the @reboot does not even create the crontv.log but the hourly one makes the log file but the script does not run.
The script itself creates another log file, but this never gets created unless I run the script manually.
This here shows the crontab and then the ls command run before and after the cron job is supposed to run:
LibreELEC:~ # crontab -l
@reboot /storage/.kodi/addons/virtual.system-tools/bin/screen -dmS sync /storage/scripts/sync.sh > /storage/crontv.log
37 * * * * /storage/.kodi/addons/virtual.system-tools/bin/screen -dmS sync /storage/scripts/sync.sh > /storage/cron.log
LibreELEC:~ # ls -lh
total 72
drwxr-xr-x 10 root root 4.0K May 20 16:25 Cinema Visiom
drwxr-xr-x 302 root root 20.0K Jun 1 22:44 Films
drwxrwxrwx 148 root root 4.0K Jun 5 19:22 TV
drwxr-xr-x 2 root root 4.0K May 14 20:16 backup
drwx------ 2 root root 16.0K May 14 20:08 lost+found
drwxr-xr-x 2 root root 4.0K May 14 20:16 music
drwxr-xr-x 2 root root 4.0K May 14 21:38 oldbackup
drwxr-xr-x 2 root root 4.0K May 14 20:16 pictures
drwxr-xr-x 2 root root 4.0K May 14 20:16 screenshots
drwxr-xr-x 2 root root 4.0K May 20 15:39 scripts
drwxr-xr-x 2 root root 4.0K May 15 21:28 zips
LibreELEC:~ # ls -lh
total 72
drwxr-xr-x 10 root root 4.0K May 20 16:25 Cinema Visiom
drwxr-xr-x 302 root root 20.0K Jun 1 22:44 Films
drwxrwxrwx 148 root root 4.0K Jun 5 19:22 TV
drwxr-xr-x 2 root root 4.0K May 14 20:16 backup
-rw-r--r-- 1 root root 0 Jun 5 19:57 cron.log
drwx------ 2 root root 16.0K May 14 20:08 lost+found
drwxr-xr-x 2 root root 4.0K May 14 20:16 music
drwxr-xr-x 2 root root 4.0K May 14 21:38 oldbackup
drwxr-xr-x 2 root root 4.0K May 14 20:16 pictures
drwxr-xr-x 2 root root 4.0K May 14 20:16 screenshots
drwxr-xr-x 2 root root 4.0K May 20 15:39 scripts
drwxr-xr-x 2 root root 4.0K May 15 21:28 zips
LibreELEC:~ #
/storage
.