We are trying to schedule mxdperfstat in task scheduler which runs daily at a specific time, but after it is run, it gets stuck in running phase.
The entire process for our mxd takes around 2-3 minutes.
When the bat file is run manually which has the following command: path/to/mxdperfstat.exe -mxd path/to/mxd.mxd everything seems to run normally and the xml report is also generated.
When the command is run in command prompt everything seems to run fine.
mxdperfstat.exe and input mxd reside in C:\mxdperfstat folder
These are the combinations which have been tried in Task Scheduler Actions tab but with each combination it gets stuck and no error seems to occur.
Program | Argument | Start In |
check_mxd.bat | C:\mxdperfstat | |
C:\mxdperfstat\check_mxd.bat | C:\mxdperfstat | |
C:\mxdperfstat\check_mxd.bat | ||
C:\mxdperfstat\mxdperfstat10.8.exe | "-mxd C:\mxdperfstat\mxd_name.mxd" | |
C:\mxdperfstat\mxdperfstat10.8.exe | "-mxd C:\mxdperfstat\mxd_name.mxd" | C:\mxdperfstat |
C:\Windows\System32\cmd.exe | /c C:\mxdperfstat\mxdperfstat10.8.exe -mxd C:\mxdperfstat\mxd_name.mxd | C:\mxdperfstat |
C:\Windows\System32\cmd.exe | /c C:\mxdperfstat\mxdperfstat10.8.exe -mxd C:\mxdperfstat\mxd_name.mxd | |
C:\Windows\System32\cmd.exe | /c "C:\mxdperfstat\check_mxd.bat" | |
C:\Windows\System32\cmd.exe | /c "C:\mxdperfstat\check_mxd.bat" | C:\mxdperfstat |
cmd | /k "C:\mxdperfstat\check_mxd.bat" | |
cmd | /k "C:\mxdperfstat\check_mxd.bat" | C:\mxdperfstat |
cmd | /c "C:\mxdperfstat\check_mxd.bat" | |
cmd | /c "C:\mxdperfstat\check_mxd.bat" | C:\mxdperfstat |
C:\Windows\System32\cmd.exe | C:\mxdperfstat\mxdperfstat10.8.exe -mxd C:\mxdperfstat\mxd_name.mxd |
User which runs the task in scheduler has privileges to the folder and also has privileges in local security group. The same user is used to run different tasks in task scheduler without any hassle.
TLDR: Manual mxdperfstat run seems to run fine, but not from task scheduler.