Windows task scheduler does not produce any output when setting tasks with xlswrite

20 ビュー (過去 30 日間)
Victor Villar
Victor Villar 2019 年 5 月 24 日
回答済み: Victor Villar 2019 年 5 月 24 日
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

回答 (1 件)

Victor Villar
Victor Villar 2019 年 5 月 24 日
Answer in the description

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by