cd "C:\Program Files\rclone-v1.56.1-windows-amd64"
rclone version --log-level=DEBUG --log-file=c:\path\to\folder\log.txt
make sure that log file exists and has correct output.
run the task as same user are you are logged in as.
That ran successfully with the following log file output:
2021/11/01 17:19:16 DEBUG : rclone: Version "v1.56.1" starting with parameters ["rclone" "version" "--log-level=DEBUG" "--log-file=C:\Program Files\rclone-v1.56.1-windows-amd64\log.txt"]
2021/11/01 17:19:16 DEBUG : rclone: Version "v1.56.1" finishing with parameters ["rclone" "version" "--log-level=DEBUG" "--log-file=C:\Program Files\rclone-v1.56.1-windows-amd64\log.txt"]
I added rclone version --log-level=DEBUG --log-file="C:\Program Files\rclone-v1.56.1-windows-amd64\log.txt" to the top of my batch file to see if the batch file would run with this line. I still got the same error 0x1 through task scheduler but it did seem that this debug line worked so task scheduler is at least running the script, just not the sync commands.
good, tasksch is running the script.
so there is something wrong with your batch fie.
try this
cd "C:\Program Files\rclone-v1.56.1-windows-amd64"
del rclone.log
rclone lsd Network: --dry-run --log-level=DEBUG --log-file=rclone.log
and post the output of rclone.log
Thanks! Sorry for the late response, I was able to use the output of this log to figure out and resolve the issue!
2021/11/02 10:16:58 DEBUG : rclone: Version "v1.56.1" starting with parameters ["rclone" "lsd" "Network:" "--dry-run" "--log-level=DEBUG" "--log-file=rclone.log"]
2021/11/02 10:16:58 DEBUG : Creating backend with remote "Network:"
2021/11/02 10:16:58 NOTICE: Config file "C:\Users\svcnetwork\AppData\Roaming\rclone\rclone.conf" not found - using defaults
2021/11/02 10:16:58 Failed to create file system for "Network:": didn't find section in config file
It seems that the service account I was using for task scheduler needed the rclone.conf file in its user directory. I copied it over from my account over to the service accounts directory and everything now works!
Thanks so much for your help!