本帖最后由 coolee2020 于 2019-12-18 15:32 编辑
- @rem 获取当前的日期以及格式化的日期
- @set Lday=%date:~0,4%%date:~5,2%%date:~8,2%
- @set sday=%date:~8,2%
- @set LastDay1=%date:~0,4%%date:~5,2%01
- @set LastDay2=%date:~0,4%%date:~5,2%15
-
- @rem 1号和15号执行第一步
- @if %sday%==1 goto yesdo
- @if %sday%==15 goto yesdo
-
- goto nodo
-
- :yesdo
- rsync -vzrtopg --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%Lday%
- @exit
-
- :nodo
-
- @rem 16-31号执行nextdo1
- @if %sday% GTR 15 goto nextdo1
-
- @rem 16-31号执行nextdo2
- @if %sday% LSS 15 goto nextdo2
-
- :nextdo1
- rsync -vzrtopgu --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%LastDay2%/increment/%Lday%
-
- @exit
-
- :nextdo2
- rsync -vzrtopgu --port 28950 --progress /cygdrive/f/codefile 172.16.0.12::BPMDEVServercodefile/%LastDay1%/increment/%Lday%
-
- @exit
复制代码
|