我需要使用 rsync 运行 cron。我写了一个批处理脚本,这是我的脚本:
START C:\cygwin64\bin\rsync.exe -v -rlt -z -p --update --delete --progress --log-file=/home/Administrator/rsynclogs/Invoices.log "/cygdrive/y/folderA//" "/cygdrive/e/folderB//"
当我从命令提示符运行脚本时,会打开一个新的命令提示符,并且脚本会正确执行。当我从任务计划程序运行它时,我收到此错误:
2019/03/11 10:40:07 [6000] building file list
2019/03/11 10:40:07 [6000] rsync: change_dir "/cygdrive/y/folderA/" failed: No such file or directory (2)
2019/03/11 10:40:07 [6000] sent 20 bytes received 12 bytes 64.00 bytes/sec
2019/03/11 10:40:07 [6000] total size is 0 speedup is 0.00
2019/03/11 10:40:07 [6000] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
可能存在什么问题?请不要告诉我使用 cygwin 安装 cron,此时我想尝试在不使用 cygwin 的情况下修复它。