title: Windows task scheduler and python logging module
body: <p>I have a program which is running on daily basis. I would like to have a log created for each run of it. Here is the snip of code responsible for logging:</p>
  
  <pre><code>logging.basicConfig(filename = 'log.txt', level = logging.DEBUG, format = '%(asctime)s - %(levelname)s - %(message)s')
  
  logging.debug('Start of program') # example logging
  </code></pre>
  
  <p>Everything runs perfectly fine as long as I launch it by .py file or .bat file (mouse clicking in file explorer). Unfortunately, when I put it on the schedule the program runs fine but log file doesn't get created.</p>
  
  <p>I have tried multiple scheduler settings but the problem seems to be located in the code of the script.</p>
  
  <p>Thanks for feedback!</p>