Windows task scheduler does not produce any output when setting tasks with xlswrite
조회 수: 12 (최근 30일)
이전 댓글 표시
I struggled a lot with this. We have our in-house reports being generated and uploaded into a cloud shared drive. For the last couple of weeks the scheduled tasks got stuck when trying to write the output to Excel files. Same things applies when importing COM Objects using actxserver.
Solution: If you schedule a task in Windows (in our case Windows Server 2016 in a VM), and there is any xls write function or COM object, save your scheduled task in your processes with the following options under the General tab
- Run only when user is logged on
- Run with the highest privileges
The first option is quite inconvinient because you will have to be logged into the machine, it seems Microsoft doesn't allow scheduled tasks to be run when you are not logged. In this case it will simply not create any file at all.
For the second one, if the destination of the file is a network drive where your account has not high privileges, you will have to grant the access by imposing admin rights through these option.
Anyway, I fought with this issue for a couple of hours.
Hopefully someone finds it useful.
-V
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!