title: Systemd service not executing my Python script
body: <p>I have my python script to schedule the creation of a text file in every 1 minutes of interval. I want to run this file in the background and it should be alive even after restarting the system.</p>
  
  <p>My Python file:</p>
  
  <pre><code>import schedule
  import time
  
  #datetime.datetime.now().strftime("%H:%M")
  
  
  def job():
      print("Scheduling is Working...")
      createfile()
  
  def createfile():
      company = "Example file"
      with open('company.txt', 'w+') as f:
              f.write(str(company))
              print("File Created on:",time.ctime(time.time()))
              f.close()
      return True
  # schedule.every(10).minutes.do(job)
  # schedule.every().hour.do(job)
  
  #schedule.every().day.at("11.40").do(job)
  schedule.every(1).minutes.do(job)
  
  while 1:
      schedule.run_pending()
      time.sleep(1)
  </code></pre>
  
  <ul>
  <li>I'm using <code>systemd</code> to make service</li>
  <li>os is ubuntu 16 and pytho3 </li>
  </ul>
  
  <p>MY Systemd service:</p>
  
  <pre><code>[Unit]
  Description=Run scheduler back
  After=multi-user.target
  Conflicts=getty@tty1.service
  
  [Service]
  Type=simple
  ExecStart=/usr/bin/python3 /var/www/html/dev/schedulerun.py &gt; /var/log/sanu_daemon.log 2&gt;&amp;1
  StandardInput=tty-force
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>I checked about status, its working fine but not creating the text file
  I couldn't figure out what is the error.</p>