Run a Python Script Online Every Day With PythonAnywhere
PythonAnywhere runs and schedules a Python script in the cloud with no server setup. Upload the file, install what it needs from a bash console with pip install –user, test it in the editor, then add a scheduled task with the path to the file and a time in UTC. Scheduled tasks need a paid plan today.
Update (November 2026): PythonAnywhere’s free Beginner account no longer includes scheduled tasks, so daily runs need a paid plan; the upload, console and task steps below are unchanged.
The example script
My example is a morning email. The script calls a few APIs and sends me one email with the weather forecast, the latest news and my to-do list for the day. Before you move a script online, run it locally once and make sure it works.

Upload the files
PythonAnywhere has a Files page where you create folders and upload files through the browser. The interface looks a bit dated, but the service works well. After you sign up, open Files from the dashboard and create a folder for the project. I called mine morning_email.

Open the folder and upload the script with Upload a file. The button takes one file at a time. My script reads its email credentials from a .env file, so I upload that file too. It stays in your private file storage, but anyone with access to your account can read it.

For more than a few files, clone your GitHub repository instead. Open a bash console from the dashboard and run git clone with the URL of your repository. Later updates are then a git pull instead of another round of uploads.
Install packages and test
Run the script once on PythonAnywhere before you schedule it. Click the file to open it in the editor and press Run. A console opens below with the output or the error.

My first run failed because PythonAnywhere could not find the Todoist API module. Third-party packages you installed on your own PC are not there. Open a bash console from the dashboard and install them for your user:
pip install --user todoist-api-python
Back in the editor, the second run went through and the email arrived.
Schedule the task
A scheduled task runs a command at a fixed time every day or every hour. Copy the full path to your script, which you find under recent files on the dashboard. Open Tasks, paste the path, and set the time. The time is in UTC, so convert it from your local time.

If a run fails, open the task’s log from the task list. It shows the same output and error messages you would see in the console.

Plans and limits
Scheduled tasks are part of the paid plans. When I recorded this, a free account could schedule one daily task. That is no longer the case. I used the paid plan then called Hacker, which allowed up to 20 tasks, hourly runs and an always-on task.
- Internet access: free accounts can only reach an allowlist of sites over HTTP(S). The Mediastack news API I used was on it. Check the list before you connect other services.
- CPU time: consoles and scheduled tasks share a daily CPU-seconds allowance.
- Time zone: task times are always UTC.
Free alternatives are a scheduled GitHub Actions workflow, or Windows Task Scheduler on a PC that is switched on at that time.
For a smaller project to schedule the same way, try my daily push notification bot. If your script needs a public URL instead of a schedule, for example a chatbot webhook, see the LINE bot project, and for web apps deploying a Streamlit app to Render.
