Update 24 October 2018 – always-on tasks has now been released to paying users.
Today we’re starting the beta for a new paid feature on PythonAnywhere: always-on tasks. If you have a paid account and would like to try them out, drop us a line at email@example.com.
With always-on tasks, you can keep a script constantly running. Once the feature’s been switched on for your account, they can be set up in the “Tasks” tab – you specify a bash command (eg. “python3.6 /home/username/myscript.py”), and the system will start running it. If it exits – say, if it crashes, or if the server has a problem – it will be restarted quickly.
We’d be really grateful for any and all feedback people have about this. We’ve been testing it internally for some months, and a private beta has been running for a while – so we’re reasonably certain it’s solid and reliable, but please do remember that it is currently beta, and there may be bugs we don’t know about.