cwrsync on Server 2008 R2 as a scheduled task

Solution 1:

Windows Scheduled Tasks run as a special system user by default (can't remember the exact name, something like LocalSystem?), but that user typically does not have the same environment or privileges as a regular user of the system. Without knowing more detail, it is difficult to tell what is actually going wrong with your Task, so I'll just mention a couple of ideas.

It is possible that your batch script accesses a mapped drive letter that is only defined to you, and so the script fails when run as the special "Scheduled Task" user. Another possibility is that your script accesses network shares, and I believe that the "Scheduled Task" user does not normally have the privilege to access those.

Finally, you could try redirecting the output of the commands in your batch script to a text file. That could be as simple as appending something like >> C:\myscriptlogfile.txt to every line in your script. Examining the output of a failed run may give you some clues about what is going wrong.