I'm running a bat
file from Task Scheduler
and am getting a last run result of There are no child processes to wait for. (0x80070080).
without the intended result of the script. If I run the script manually it works like a charm. It is just doing an automated git
commit
and push
. Any searching I do on the error proves to be a bit useless.
Anyone have any insight for me?
The bat
file contains the following:
@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
Set hname=%COMPUTERNAME%
cd %HOME%\my_dir
git config --global user.name "Batch Script"
git config --global user.email "bat@test.com"
git add --all
git commit -m "File Backup: %mydate%_%mytime%_%hname%"
git push 2>&1
EXIT
Things I have tried:
- running as .bat or .cmd (recommended here)
- changing program/script to be 'cmd.exe' and arguments to be /c "C:\mypath\myscript.bat" (recommended here)
- changing program/script to be 'test.bat' and 'Start in' to be "C:\mypath" (recommended here)
- running as
SYSTEM
All of these result in the same error message as listed above.
- Adding
| Out-Null
after2>&1
results in the error message now beingThe extended attributes are inconsistent