1
i want to automatically sync the folder on my windows pc to my external harddrive connected to a raspberrypi. My script works and just uses rsync to copy 2 folders over.
I want to automate it via Task Scheduler but it doesn't work. I tried running it directly as a bash script from Task Scheduler and i tried another thing that came to my mind. I wrote a batch file which executes my bash script. It works when executing the batch file per hand but when i do it via Task Scheduler it doesnt work anymore and i cant figure out why since i dont have error messages or something.
I also wrote another batch file which creates a folder and executed it via Task Scheduler which worked fine. The Problem hast to be something with Task Scheduler and bash.
Any help would be much appreciated!
Bash script:
#!/bin/bash rsync -rtv -e "ssh -i /home/fernien/id_rsa" /mnt/g/100D3300/ root@192.168.158.35://mnt/share/Bilder/Normal rsync -rtv -e "ssh -i /home/fernien/id_rsa" /mnt/g/Bilder\ Editiert/ root@192.168.158.35://mnt/share/Bilder/Editiert
Batch file to run this script:
tried different varieties. With -c, without -c, with "./" and without.
@echo off c:\scripts\ bash.exe -c "./sync.bash"
1Do you mean
cd /d c:\scripts\
in the second line of your batch file? – FedonKadifeli – 2019-07-18T13:13:58.807