Is there a way to make the Python program to run in background when the system boots?
(on windows and linux systems)
Is there a way to make the Python program to run in background when the system boots?
(on windows and linux systems)
You Can Add Your Script In Startup!
Here is For Window 10
1) First Open Your File Explorer!
Then Paste This Address C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Here is the ScreenShot!
in that folder paste your script!
Here is another Screenshot!
It Will Automatically Start Your Script When Your System Boot
Another Thing You Can Try Task Scheduler!
For More Details Here is the website that can help you!
On linux in a terminal:
crontab -e
then add the following to the file:
@reboot /usr/bin/python3 /path/to/your/python/script.py
Yes, If your OS is linux then you can try supervisor. Otherwise you can just directly create a service in linux for your python file which you wants to run and then enable it for auto start when system boots up.
This solution is specially for linux system
Add your script as
python /path/to/script.py &
so add python /path/to/script.py & to /etc/rc.local