To run a Python script on a server using screen in cPanel WHM, follow these steps: Step 1: Access WHM or cPanel Terminal Log into WHM or cPanel. Open Terminal: Go to Terminal in the cPanel interface. Step 2: Start a screen Session In the terminal, start a new screen session by typing: bash Copy code screen -S my_script_session This will start a new screen session named my_script_session, where you can run your Python script. Step 3: Run Your Python Script Run your Python script within this screen session: bash Copy code python3 /path/to/your/script.py The script will begin running, and screen will keep it running even if you log out. Step 4: Detach from the Screen Session To leave the screen session and keep it running, press Ctrl + A, then D. This detaches the screen session but leaves your script running in the background. You can now safely log out of cPanel, and the script will continue to run. Step 5: Reattach to the Screen Session (Optional) If you need to reattach to the screen session later to check on the script, type: bash Copy code screen -r my_script_session Step 6: End the Session (When Needed) To stop the script, reattach to the session, and then terminate the process by pressing Ctrl + C. This will let your script run in the background continuously without the need to set up cron jobs or any further configuration.