4

I have written a python program that periodically runs with ApScheduler package. The .pyw file runs in the background, but when I restart the PC the program doesn't continue running.

What can I do to run a code automatically in startup a windows 10 pc?

  • Does this answer your question? [How to start a python file while Windows starts?](https://stackoverflow.com/questions/4438020/how-to-start-a-python-file-while-windows-starts) – JinSnow Oct 20 '22 at 10:24

1 Answers1

6

You should consider putting your python file to the Startup folder.

Click Win+R at the same time on your keyboard
Type shell:startup
Drag and drop your python file onto the folder that opened.

Note: I reccomend to put a shortcut of your python file for easier editing.

Remigiusz Schoida
  • 332
  • 1
  • 2
  • 10