Search code examples
pythonwindowspython-3.xstartupapscheduler

Windows 10 run python program in startup


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?


Solution

  • 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.