How to Schedule & Automatically Run Python Code!
The first 1000 people to use the link will get a free trial of Skillshare Premium Membership: https://skl.sh/keithgalli11201
In this video we learn various methods for how we can schedule and automatically run python code. We'll start by looking at cronjobs & windows task scheduler and then we will walk through running tasks in the cloud using AWS Lambda & Cloudwatch. The ultimate goal of this video is to learn how we can automatically generate & send an email with an analytics report every day.
There are methods highlighted in this video that will work on Mac, Linux, & Windows.
~ GitHub resources ~
Link to source code: https://github.com/KeithGalli/scheduling-code
Link to analytics report code: https://github.com/KeithGalli/generate-analytics-report/tree/send_email
~ Relevant videos ~
How to generate an analytics report in python: https://youtu.be/UmN2_R4KEg8
How to send an email with python (@Corey Schafer ): https://youtu.be/JRCJ6RtE3xU
~ Articles mentioned ~
AWS Lambda memory limits: https://hackernoon.com/exploring-the-aws-lambda-deployment-limits-9a8384b0bec3
Downloading python linux libraries on Windows: https://medium.com/@korniichuk/lambda-with-pandas-fd81aa2ff25e
~ Other resources ~
Python email library docs: https://docs.python.org/3.8/library/email.examples.html
AWS Cron info (scheduling): https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
Lambda package setup: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html
Thank you to Skillshare for sponsoring this video!
-------------------------
Video timeline!
0:00 - What we’ll be doing in this video
0:56 - Check out Skillshare! (sponsored)
1:56 - How can we automate scripts? Overview of local, cloud, and serverless methods
5:18 - Simple example of local script automation w/ cronjobs & windows task scheduler
18:32 - How to schedule code on a cloud machine (use cronjobs)
18:51 - Simple example of cloud script automation w/ AWS Lambda & Cloudwatch
27:09 - Schedule & automate sending an email locally
45:12 - Schedule & automate sending an email on the cloud w/ Lambda & Cloudwatch
50:18 - Installing python packages in a serverless environment (zip uploads)
55:50 - Generate & schedule sending analytics reports (locally)
1:02:45 - Generate & schedule sending analytics reports in AWS Lambda
1:07:03 - Limitations of lambda (max file upload size)
1:09:00 - Generate & schedule sending analytics reports in AWS Lambda
1:18:32 - Final thoughts & video recap!
-------------------------
Follow me on social media!
Instagram | https://www.instagram.com/keithgalli/
Twitter | https://twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: https://youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=keithgalli&utm_content=description-only
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Видео How to Schedule & Automatically Run Python Code! канала Keith Galli
In this video we learn various methods for how we can schedule and automatically run python code. We'll start by looking at cronjobs & windows task scheduler and then we will walk through running tasks in the cloud using AWS Lambda & Cloudwatch. The ultimate goal of this video is to learn how we can automatically generate & send an email with an analytics report every day.
There are methods highlighted in this video that will work on Mac, Linux, & Windows.
~ GitHub resources ~
Link to source code: https://github.com/KeithGalli/scheduling-code
Link to analytics report code: https://github.com/KeithGalli/generate-analytics-report/tree/send_email
~ Relevant videos ~
How to generate an analytics report in python: https://youtu.be/UmN2_R4KEg8
How to send an email with python (@Corey Schafer ): https://youtu.be/JRCJ6RtE3xU
~ Articles mentioned ~
AWS Lambda memory limits: https://hackernoon.com/exploring-the-aws-lambda-deployment-limits-9a8384b0bec3
Downloading python linux libraries on Windows: https://medium.com/@korniichuk/lambda-with-pandas-fd81aa2ff25e
~ Other resources ~
Python email library docs: https://docs.python.org/3.8/library/email.examples.html
AWS Cron info (scheduling): https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
Lambda package setup: https://docs.aws.amazon.com/lambda/latest/dg/python-package.html
Thank you to Skillshare for sponsoring this video!
-------------------------
Video timeline!
0:00 - What we’ll be doing in this video
0:56 - Check out Skillshare! (sponsored)
1:56 - How can we automate scripts? Overview of local, cloud, and serverless methods
5:18 - Simple example of local script automation w/ cronjobs & windows task scheduler
18:32 - How to schedule code on a cloud machine (use cronjobs)
18:51 - Simple example of cloud script automation w/ AWS Lambda & Cloudwatch
27:09 - Schedule & automate sending an email locally
45:12 - Schedule & automate sending an email on the cloud w/ Lambda & Cloudwatch
50:18 - Installing python packages in a serverless environment (zip uploads)
55:50 - Generate & schedule sending analytics reports (locally)
1:02:45 - Generate & schedule sending analytics reports in AWS Lambda
1:07:03 - Limitations of lambda (max file upload size)
1:09:00 - Generate & schedule sending analytics reports in AWS Lambda
1:18:32 - Final thoughts & video recap!
-------------------------
Follow me on social media!
Instagram | https://www.instagram.com/keithgalli/
Twitter | https://twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: https://youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
https://stratascratch.com/?via=keith
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=keithgalli&utm_content=description-only
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Видео How to Schedule & Automatically Run Python Code! канала Keith Galli
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![How to Convert any Python File to .EXE](https://i.ytimg.com/vi/UZX5kH72Yx4/default.jpg)
![How to Generate an Analytics Report (pdf) in Python!](https://i.ytimg.com/vi/UmN2_R4KEg8/default.jpg)
![The Fastest Way to Loop in Python - An Unfortunate Truth](https://i.ytimg.com/vi/Qgevy75co8c/default.jpg)
![Solving real world data science tasks with Python Pandas!](https://i.ytimg.com/vi/eMOA1pPVUc4/default.jpg)
![How To Schedule Python Scripts As Cron Jobs With Crontab (Mac/Linux) - Python Task Automation](https://i.ytimg.com/vi/5bTkiV_Aadc/default.jpg)
![Schedule Python Tasks (in Windows) : Data Science Code](https://i.ytimg.com/vi/CAH0B1ErriI/default.jpg)
![Everything you need to know about Classes in Python! (Object Oriented Programming Tutorial)](https://i.ytimg.com/vi/tmY6FEF8f1o/default.jpg)
![Super quick Python automation ideas](https://i.ytimg.com/vi/qbW6FRbaSl0/default.jpg)
![](https://i.ytimg.com/vi/Dj9ALhih8ms/default.jpg)
![Schedule Python Scripts in Windows](https://i.ytimg.com/vi/ic4lUiDTbVI/default.jpg)
![Automate Excel With Python - Python Excel Tutorial (OpenPyXL)](https://i.ytimg.com/vi/7YS6YDQKFh0/default.jpg)
![Python Tutorial: Datetime Module - How to work with Dates, Times, Timedeltas, and Timezones](https://i.ytimg.com/vi/eirjjyP2qcQ/default.jpg)
![Python Tutorial: if __name__ == '__main__'](https://i.ytimg.com/vi/sugvnHA7ElY/default.jpg)
![Linux/Mac Tutorial: Cron Jobs - How to Schedule Commands with crontab](https://i.ytimg.com/vi/QZJ1drMQz1A/default.jpg)
![How to Program a GUI Application (with Python Tkinter)!](https://i.ytimg.com/vi/D8-snVfekto/default.jpg)
![Real-World Python Machine Learning Tutorial w/ Scikit Learn (sklearn basics, NLP, classifiers, etc)](https://i.ytimg.com/vi/M9Itm95JzL0/default.jpg)
![Solving real world data science tasks with Python Beautiful Soup! (movie dataset creation)](https://i.ytimg.com/vi/Ewgy-G9cmbg/default.jpg)
![Python Data Science Project Ideas! (for all skill levels)](https://i.ytimg.com/vi/V5_waf_9_rU/default.jpg)
![🤖 How to use Microsoft Power Automate Desktop - Full tutorial](https://i.ytimg.com/vi/IQ_KpBC8fwo/default.jpg)
![How to Automate a Python Script to Run Daily](https://i.ytimg.com/vi/0fQjA8w1woQ/default.jpg)