Python Automation Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

To properly automate tasks, we need a platform so that they run automatically at the proper times. A task that needs to be run manually is not really fully automated.

But, in order to be able to leave them running in the background while worrying about more pressing issues, the task will need to be adequate to run in fire-and-forget mode. We should be able to monitor that it runs correctly, be sure that we are capturing future actions (such as receiving notifications if something interesting arises), and know whether there have been any errors while running it.

Ensuring that a piece of software runs consistently with a high reliability is actually a very big deal and is one area that, to be done properly, requires specialized knowledge and staff, which typically go by the names of sysadmin, operations, or SRE (Site Reliability Engineering). Sites like Amazon and Google require huge investment in ensuring that everything works 24/7.

The objective for this book is way more modest than that. You probably don't require a downtime lower than a few seconds per year. Running a task with reasonable reliability is a much easier thing to do. But, be aware that there's maintenance to be done, so be prepared for that.