2
1
I have installed msysgit for windows 8. I am attempting to automate a git pull every 5 minutes. I am using scheduled tasks to run a script I wrote. The schedule task's action is:
powershell -ExecutionPolicy Bypass File C:\Path\To\Git\Script.ps1
The script file mentioned above contains:
cd C:/Path/To/Git/Repository
git pull
When I run this script as a local user, it works successfully. However when I switch it to run as system, it appears to run successfully but it does not. The scheduled task runs successfully but the repository does not pull in new code.
Does anyone have any suggestions for running this task silently and successfully in the background?
Why do you want to give
SYSTEM
privileges to third-party software that certainly doesn't need them? – user1686 – 2013-05-06T21:25:25.737Try it running as you, but check the "Hidden" checkbox. – Mark Allen – 2013-05-06T22:39:30.793
@grawity not ideal but ssh key tied to that computer only has read access to the git repo – bacord – 2013-05-07T01:05:08.580
@MarkAllen It works if I run it as the local user, but the "hidden" checkbox does not hide the window. The hidden checkbox doesn't seem to change it at all. – bacord – 2013-05-07T01:08:25.250
2Weird. Well, make a new user account, configure it to run as that user, even when not logged on (which should be an option.). Then log off and back on as yourself. – Mark Allen – 2013-05-07T04:23:40.820
@MarkAllen I think this should be a viable option. I'll update once I give that a try. Thanks! – bacord – 2013-05-07T13:01:43.883