Forums

How to keep my script running?

I have a py file keep doing web scraping by intervals. But sometime it will be stop running after several days , how can I make sure it keeps running? Thanks

Use a scheduled task. If you run it in a console, the console may be killed to manage the service.

how can i input if the script need I/O? i can't find the console for scheduled task.

There is no console for scheduled tasks. If you need to enter information in a console for the script to work, then you cannot use it in a scheduled task unless you rewrite it so that it gets that information from somewhere else (like a file or a database)