I have 2 windows scheduler tasks configured to run some exe on the remote machine. Both scheduled tasks triggers at exact the same time (say, at 06:00 AM) and they both do the same thing: they remotely execute my exe via paexec on the same remote machine. Sometimes that works OK as it should, but sometimes it fails on both task instances, with paexec code error -6.
The command used to run both of these two task, configured in windows scheduler, is:
paexec \\RemoteMachine -u MyuserName -p Mypassword -h -c -csrc C:\MyProg.exe MyProg.exe
I'm wondering why this error sometimes occur (more often than not) and, of course, how to get this to work correctly. Any ideas?
(Remark: the error never shows up when those tasks are configured to run at different times!)