Good day! Help to deal with this problem.

I wrote a script on python that takes data from the database and writes it to Excel. If I use the task scheduler, then everything succeeds, but I do not see the excel file anywhere, which should be the output. I do it manually through the console, the file is created, everything is as I need.

Why doesn't the job scheduler save an excel file?

  • Quite right, not mandatory, and in its absence the current directory is used. The problem is that the current directories for manual start and from the scheduler are different. But this can be solved, the scheduler allows you to specify the directory from which the script will run, this will be the working directory of the script. Apparently, you left this field empty. - Vitalts

1 answer 1

Understood, helped the last answer from here .
My problem was that I did not specify a working folder. Although it states that this is an optional item.

  • Program / script: C: \ Python27 \ python.exe (Full path of the executable file)
  • Add Arguments (if required): test.py (Name of the file to be launched)
  • Working folder (if required): C: \ Python27 (Full path to the folder where the file is located)
  • Although the link can find the answer to the question, it is better to point out the most important thing here, and give the link as a source. If the page to which the link leads will be changed, the response link may become invalid. - From the queue of checks - Denis
  • @Denis thanks a lot. :) - kak2c