Filter löschen
Filter löschen

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

20 Ansichten (letzte 30 Tage)
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

Antworten (1)

Victor Villar
Victor Villar am 24 Mai 2019
Answer in the description

Kategorien

Mehr zu Use COM Objects in MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by