Ask Your Question
3

How can I execute a python script while my laptop is closed for the duration of the night?

asked 2022-09-21 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-08 02:00:00 +0000

nofretete gravatar image

There are several ways you can achieve this, depending on your operating system and requirements:

  1. Use a cloud-based solution: You can upload your script to a cloud-based service like Amazon Web Services (AWS) or Microsoft Azure and schedule it to run at specific times using their scheduling services. This way, your laptop can be turned off or closed, and the script will still run in the cloud.

  2. Use a virtual private server (VPS): You can rent a VPS from a hosting provider and SSH into it to run your script. You can set up a cron job to schedule the script to run at specific times.

  3. Use a Raspberry Pi: You can set up a Raspberry Pi to run the script and leave it running overnight. The Raspberry Pi is a small computer that can be configured to run Linux, and it can be set up to run scripts automatically.

  4. Use the Windows Task Scheduler or the Mac Automator: You can create a task in the Windows Task Scheduler or Mac Automator to run your script at specific times. This way, you can shut down or put your laptop to sleep, and the script will still run as scheduled.

Note: If your laptop is a Mac, it is not recommended to run scripts while the laptop is closed, as this can cause overheating and other issues. Instead, it is recommended to leave the laptop open with the display turned off.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-21 11:00:00 +0000

Seen: 8 times

Last updated: Mar 08 '23