console stops executing telegram bot script after a certain time

Approximately once a day the script stops and to enable it i need to restart the console. Please help me - how to fix this?

That's an expected behavior on PythonAnywhere, since our consoles are ephemeral by design. You should rather try Always-on tasks instead, if you have a code that's indended to run permanently.

Thanks, I tried, but when i run scripts with Always-on tasks, it doesn`t see my .json db.. And return FileNotFoundError: [Errno 2] No such file or directory: 'file.json'. But it exist in the same folder, with script.

(and if i run my script from console -- it is working.)

How can i fix it?