Rsync for Windows cannot run on Task Scheduler

為{幸葍}努か 提交于 2019-12-11 03:23:04

问题


I have batch script stated below and I run it on Task scheduler (Windows 2008 R2). When it runs, the status of the task is still running and takes too long. I couldn't see any errors or even in history or any logs. I already set the correct owner and permission of the locations in windows. Any one can shed me some lights? Thanks!

SETLOCAL

SET CWRSYNCHOME=C:\scripts\CWRSYNC
SET CYGWIN=nontsec
SET HOME=%HOMEDRIVE%%HOMEPATH%
SET CWOLDPATH=%PATH%
SET PATH=%CWRSYNCHOME%\BIN;%PATH%

rsync -rltDuv --progress -e "ssh -i /cygdrive/c/scripts/id_rsa"  /cygdrive/c/backup/ root@123.123.123.123:/path/to/backup/ > c:/scripts/logs.txt 2>&1

来源:https://stackoverflow.com/questions/10024415/rsync-for-windows-cannot-run-on-task-scheduler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!