How to Schedule & Automatically Run Python Code!

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 101

  • @KeithGalli
    @KeithGalli  4 роки тому +13

    Hope everyone is doing well! If you have any questions about the material covered, let me know in the comments :)
    Also, be sure to check out Skillshare: skl.sh/keithgalli11201. The first 1000 people to use the link will get a free trial of Skillshare Premium Membership!

    • @leonardoduarte7647
      @leonardoduarte7647 4 роки тому +1

      Hello Keith Galli,
      Could you record a quick video explaining how to schedule a script running on the jupyter notebook? You will help me a lot...
      Thanks, I appreciate your work here on UA-cam.

    • @woonie3134
      @woonie3134 4 роки тому

      Hey could u make a video on food classification and recommendation combined? Classify a meal and recommend recipe plzzz

    • @legacies9041
      @legacies9041 4 роки тому

      I hope you do an advanced course in Keras with custom models and custom compile

  • @tyswenson7542
    @tyswenson7542 4 роки тому +20

    Keith continues to read my mind with video ideas..

  • @krystianmasiak6212
    @krystianmasiak6212 4 роки тому +2

    Man, I just want to say thank you. You showed me python, now i'm looking for job in Data Science and i'm much above my friends from studys on that specialization, so...
    THANK YOU!

  • @justin3594
    @justin3594 4 роки тому +5

    I just found your channel a few days ago and it’s already become my favorite python channel. I really love the real world examples. Fantastic content. Please keep it up.

  • @RougeSam
    @RougeSam 4 роки тому +4

    I LITERALLY just needed this solution. Let’s go Keith

  • @cambridgebreaths3581
    @cambridgebreaths3581 4 роки тому +2

    Keith , how to motivate an absolute beginner to start delving into this giant ocean of programming, honestly feel overwhelmed just opening a book or watching a video, even your amazing videos. THANKS

    • @vestborobaptistchurch3161
      @vestborobaptistchurch3161 4 роки тому

      Just do it

    • @danielrv1325
      @danielrv1325 4 роки тому +2

      Hello Cambridge, I would like to give you an advice.
      Say you want to exercise but there are so many different sports that you don't know where to start... well not doing anything is not a good start, see what fits you better or what you like and then try-out. Indeed programming is a "giant ocean", so first you should know what area/s interests you. Select a broad area (for example web development or data science) and then go deeper or even change/combine paths as you advance.
      Motivation is second tier, what you need is being constant and resilient. You don't build a house on a motivated day, each day you place some bricks and after sometime, you have a house. Sure, some days you may be more motivated so you advance faster, but being constant means that even in a day you are not motivated at-all you still make progress and that is key for getting closer to your goal. Being resilient helps since (I assume you don't come from a programming background, neither did I) some concepts might get complicated so a strong mindset is needed to continue learning and not quitting or waiting again till you feel motivated.

    • @cambridgebreaths3581
      @cambridgebreaths3581 4 роки тому

      @@danielrv1325 THANK YOU KINDLY DANIEL! REALLY GREAT ADVICE. THANKS AGAIN.

    • @vestborobaptistchurch3161
      @vestborobaptistchurch3161 4 роки тому

      @@cambridgebreaths3581 wow where’s my thank you? Let me just say that, even though I spent a lot of time with sites like freecodecamp and sololearn, I didn’t really become what I would consider to be a semi competent programmer until I had to do it for my job. I was inheriting a lot of python scripts from a boss who left and that’s when I realized I could use it to make stuff that was really cool and practical. I used the scripts he built to get a basic and practical foundation, and then I went to Keith’s videos to expand my skills.
      There’s just all sorts of cool shit you can do with python that is practically useful. For instance, I used my basic knowledge to pull covid data from an api and analyze it, which is something I used to do with Excel but that was so slow and lame. I can also use api requests to make tables of marijuana strains and their genetics, which is something I’m interested in. There are so many practical guides on UA-cam to build a project from start to finish: just copying one of those line by line will build your skills and all you have to do is modify a few things to make wholly different projects.
      It’s not about just gaining knowledge for its own sake but making practically useful things. You’re lucky to be diving into this during a time when a lot of the tutorials are ready made and there is a huge knowledge base on sites like stack exchange that will answer most questions you have. So just do it. Build something

    • @cambridgebreaths3581
      @cambridgebreaths3581 4 роки тому

      @@vestborobaptistchurch3161 Thanks Vestbord. This one programming advice, to just do it and start programming, (overlooked inadvertently!), summaries the best programming advices.Thanks again

  • @itsmesanto
    @itsmesanto Рік тому

    This is great. Better than paid tutorials out there. Thanks for providing it for free.

  • @saulflores5052
    @saulflores5052 4 роки тому +1

    This is an amazing resource. I'm using what I am learning from these videos for projects in my internship. Thank you!!!

  • @sarathk8183
    @sarathk8183 4 роки тому +1

    You are so committed in what you do in all your videos. Thank you so much since I wanted a script I wrote that taps into SQL server -> dB -> Tables -> data frames and dashboard output to run automated....great timing and awesome video

  • @tellulois445
    @tellulois445 3 роки тому +1

    Well done! Bro, Keep making such beautiful Videos

  • @xxpwnr4lif3xx
    @xxpwnr4lif3xx 3 роки тому

    I'm new into web-scraping. For school, I'm trying to create a project comparing food prices in in different settings like Chick-Fil-A in stores vs Chick-Fil-A in airports/malls. I watched your other web-scraping videos but I think a video about scraping then converting it over to an excel/csv file would be very nice! Thank you for all the content you do post!!!

  • @NoahElRhandour
    @NoahElRhandour 4 роки тому +2

    i really appreciate the creative and useful tutorial topics

  • @theholybananaaaandthemiley6815
    @theholybananaaaandthemiley6815 4 роки тому +6

    Amazing Content. I appreciate the effort!!

  • @radabbadaa
    @radabbadaa 4 роки тому +1

    Awesome vids from this channel. Keep it up!

  • @ed-salinas-97
    @ed-salinas-97 3 роки тому

    This video showed up on my recommendations at the right time. UA-cam reading my mind. I've been trying to wrap my head around Cloud Functions for a while but had not seen any suitable examples until now. Only problem for me, though, is that I want to be able to use Google Cloud Functions, and it's not really clicking for me to translate what you show with AWS Lambda to GCP Cloud Functions. I'm hoping it'll "click" at some point since I'd rather use the GCP Ecosystem. If it doesn't, I'll switch over to AWS Lambda since what you show in this video does seem to make good sense and will make for a good template for my particular projects. Thanks!

  • @immanuelsuleiman7550
    @immanuelsuleiman7550 4 роки тому +1

    This is incredibly useful
    great job as always
    thank you

  • @procode6881
    @procode6881 4 роки тому +1

    Sick video ...really fun one...just a suggestion could you upload videos more often..also i know u are busy with your job

  • @abuaisha93
    @abuaisha93 4 роки тому +2

    Thanks for these great videos

  • @EUU100
    @EUU100 3 роки тому

    Thank you for your clear delivery and explanations, loved it. Gave me what i was looking for plus also taught me about other methods and just more general knowledge about python windows and linux. I wish you all the success and happiness you desire

  • @andyn6053
    @andyn6053 4 роки тому +2

    Great stuff as always Keith! I have learned more from you than during my whole engineering education at the university!

  • @venturibr
    @venturibr 3 роки тому +1

    This is very nice, thank you!

  • @legacies9041
    @legacies9041 4 роки тому +2

    I hope some day you will do a video on custom models in Keras and other advanced stuff

  • @stevegabrial1106
    @stevegabrial1106 3 роки тому +1

    Hi, is any playlist like Data Science or Machine learning in 100 days. Thanks

  • @thomasrayanthony4871
    @thomasrayanthony4871 4 роки тому

    WHOAH HERE BEFORE 100k GEETH

  • @prasadcaher
    @prasadcaher 4 роки тому +1

    Awesome 👍 thanks for making this so simple.🤘

  • @vincentthoma9889
    @vincentthoma9889 4 роки тому +1

    Hi, can you make a video about typical questions, which a data scientist has to answer?

  • @debjyotibanerjee7750
    @debjyotibanerjee7750 4 роки тому +1

    We don't need to install python specially for Kali app, if we already have it for windows, right?

  • @cozyvibes6178
    @cozyvibes6178 Рік тому +1

    19:40 Best way to host and run phython script for free with AWS

  • @juanbetancourt5106
    @juanbetancourt5106 Рік тому

    Thank you for your knowledge good Sir.

  • @akkaraponchaiyana4772
    @akkaraponchaiyana4772 4 місяці тому

    How to solve this issue: sudo: service: command not found? Thank you so much.

  • @jthomassaldias
    @jthomassaldias 2 роки тому +1

    Hello Keith, I have followed your instructions to schedule a run script from phyton but Im unable to find out what is wrong... the scheduler simply does not run the script... i have tried with .exe files and do but not the .py.... running the .py outside the shell performs as expected.
    What would you recommend?
    Thank you.
    Thomas

  • @thomasrayanthony4871
    @thomasrayanthony4871 4 роки тому +1

    Hey Keith! You should do a hair tutorial! Get a bowl cut or mullet!

  • @rajith9562
    @rajith9562 Рік тому

    Hey Keith! Amazing video man...totally love it! I was trying out the Dog photo messaging which you just showed in it and I was getting only the url of the photo gotten from the api instead of the photo when the message pops up in my phone. Can you help me with it!? Thanks

  • @Qibbles
    @Qibbles 4 роки тому +1

    I use a raspberry PI zero to run my scripts and cronjob. Hardly any overhead and I can leave it 24/7!

  • @MrTheyosyos
    @MrTheyosyos 4 роки тому

    1) r'c:\full\path' == 'c:/full/path'
    2) To get a full path og a file:
    Hold shift + right mouse click on file -> "copy as path"

  • @TheRavi24
    @TheRavi24 8 місяців тому

    Hi Keith please could you please show how to run in azure pipeline ? 😢

  • @venn5318
    @venn5318 4 роки тому

    Man I love your vids you are the best! Its hard to get a nice answer because everyone calls themselves professionals these days but you are the gold. So here goes my question: Is there any real great book/books or courses you can suggest for python oop + algorithms in general? Also a personal question >> which programming languages you think I should crash? In school we started with python but I find c++ so fun as well.. or what other languages I should master for getting a good job and being well skilled? Really hoping you answer me.Thank you 😭🥺

  • @daji1952
    @daji1952 Рік тому

    @KeithGalli thanks for the video but i am having a problem I am having python file and i did the same crontab as shown in video i am not ale to run the file automatically i can see cron job it is proper but now i am not able to understand what went wrong [not from coding background]

  • @BJCP
    @BJCP 3 роки тому +1

    Hey Keith, would it be possible to cover making a python program into a service? I have some monitoring tasks that I'd like to run that continue to monitor files in a folder. It would be really nice to make this into service / background task.

  • @zelaTVV
    @zelaTVV 2 роки тому

    That's a really good video thank you

  • @eduedu726
    @eduedu726 4 роки тому +1

    thank you !

  • @AlexMercersRevenge
    @AlexMercersRevenge 2 роки тому

    Whenever I make a automated python script I keep running into Windows User Account Control popup. Python can't do ANYTHING from here. How do I use python to work around this so I can make a useful python script?

  • @noahh0578
    @noahh0578 Рік тому

    Hey Keith. I am running into an inssue using the scheduling method via AWS. I have python code that flips through 3 phone numbers, but when I schedule it to run every day at 11am my code is executed from the starting phone number. And instead of having 1 Log stream with each event every day at 11am a new logstream is created everyday. Why might this be happening?

  • @TheSergiGarcia
    @TheSergiGarcia 3 роки тому

    Hi Keith! I keep having an error message on AWS Lambda like this 'SMTPAuthenticationError'. It looks like I can't login into my gmail, but it works if I run the code in the terminal. I also enabled access to less secure apps in gmail, but still it doesn't work. I was wondering if you have had this problem before or not.

  • @python360
    @python360 4 роки тому

    Nice video. I leave a Pi 4 running 24/7 for CRON jobs and web scraping.
    Ps why did you use port 465 for smtp and not 587 ? I thought 465 was deprecated.

  • @TengoT
    @TengoT 2 роки тому

    Hey, can you please help me to schedule a job in python every 2 hours starting at some particular time. I wrote the code as - schedule.every(2).hours.at("01:00").do(func). but this is not working.

    • @KeithGalli
      @KeithGalli  2 роки тому

      I recommend using one of the methods I described in this video. Hard to keep a python script actively executing for extended periods of time. Also if you do the method you described, you'll probably want to make sure the time zone is correct, because by default it will probably be UTC.

  • @jamestang1737
    @jamestang1737 4 роки тому

    Thanks for another practical walkthrough, Keith. Question here-I'm on a windows and trying to set up task scheduler with a python script. Running into an "no module named selenium" (example as thats one of the modules in my script) but I had set both python and anaconda to my path. Also tried a batch file where I first list the python.exe path along with my script but that also doesnt work. Any obvious pointers? Thanks in advance man

  • @tushardeepsingh4976
    @tushardeepsingh4976 2 роки тому

    Keith I want to schedule my python code every week at a particular time . Request you to please suggest what to do

    • @KeithGalli
      @KeithGalli  2 роки тому

      I recommend hosting a cheap machine in the cloud and running a cron job at a weekly interval. I think this is the simplest to setup, reliable solution

  • @fentonmsu
    @fentonmsu 4 роки тому

    I could use that to set up links to pages to share my UA-cam videos

  • @vasantkumar5539
    @vasantkumar5539 3 роки тому

    Can you create guide on ApScheduler python package

    • @matorac
      @matorac 2 роки тому

      Apscheduler is great for windows, linux or mac. I created web app using flask+apscheduler,+angular for running py jobs, viewing logs.. everey job has its own py env using pipenv.

  • @jargon8
    @jargon8 4 роки тому

    Hey Keith i need help my Sublime text 3 always errors it always shows this: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
    [Finished in 0.5s] If any of the viewers know this you can help fix it

  • @pbottiglione
    @pbottiglione 3 роки тому

    Hi Keith quick question. To schedule a Jupyter notebook job do I need to save it as a python py format first and then use the window scheduler? or can I do it on the notebook directly using the import schedule function? If I use the import schedule function say I run it on virtual machine do I need to keep it open in my browser in order to work? Thank Keith

    • @sgkg7178
      @sgkg7178 2 роки тому

      Were you able to find a solution for this?

  • @kevingrondin974
    @kevingrondin974 4 роки тому

    Do you use wsl 1 or wsl 2 ?

    • @KeithGalli
      @KeithGalli  4 роки тому +1

      I think I use wsl 2 at this point, but to be honest I'm not even sure. Don't think the version should matter for the purpose of this video.

  • @BiologyIsHot
    @BiologyIsHot 3 роки тому +1

    Surprised this didn't include the Python module "schedule!"

  • @michaeloliveira6745
    @michaeloliveira6745 4 роки тому

    Awesome! thanks

  • @danielrv1325
    @danielrv1325 4 роки тому

    When I run the crontab -l or -e, I get the following text:
    'Support/E3FE50D5-DB55-470F-8B7A-2B574AC40711/43139812-B903-4DD3-84F0-395806C84045 h >/dev/null 2>&1'
    I've already gave full disk access to terminal but still haven't find anything on stackoverflow or other site to make crontab -l display the same. Unsure what this is :(

    • @KeithGalli
      @KeithGalli  4 роки тому

      What OS are you on and what terminal are you using?

    • @danielrv1325
      @danielrv1325 4 роки тому

      @@KeithGalli OS Catalina version 10.15.7 and the Mac terminal version 2.10

    • @jpdkhuntiya8540
      @jpdkhuntiya8540 4 роки тому

      How to graphic design in Python tools

  • @milesmena4994
    @milesmena4994 2 роки тому

    I'm here because I want to do a similar task to texting yourself a picture of a dog!

  • @patrickdamour1728
    @patrickdamour1728 4 роки тому

    Cute dog!

  • @thomasrayanthony4871
    @thomasrayanthony4871 4 роки тому

    Me and my 7 siblings are your subscribers!

  • @dookshi
    @dookshi 4 роки тому

    Great tips! What about running Python code on Android phones? There are schedulers but we're missing the first and foremost a Python interpreter here. :-( Given all the great Python content on your channel (so simple yet so powerful) how come there's nothing about running Python on the one platform out there capable of continuously generating huge amounts of invaluable data from all the sensors that smartphones have? Running ML models on real-time data in our pockets! Aren't Python+ML and smartphone sensors a match made in heaven???

  • @DanielMartinez-cx9bp
    @DanielMartinez-cx9bp 4 роки тому

    Do a Kaggle comp.

  • @anilv9788
    @anilv9788 4 роки тому

    Awesome your 🙏

  • @deltreseshabattawowowwwow6825
    @deltreseshabattawowowwwow6825 4 роки тому

    Rah rah rah! I like muffins!

  • @raymondchan3587
    @raymondchan3587 2 роки тому

    Install and Import schedule is much easier.

  • @huili1920
    @huili1920 Рік тому

    error:

  • @huat99me
    @huat99me Рік тому

    great

  • @apricotsareyummycrunchandg1872
    @apricotsareyummycrunchandg1872 4 роки тому

    Apricot

  • @NomadicBrian
    @NomadicBrian 3 роки тому

    I don't like WSL to start with. Too many pieces of Microsoft tools required. Not worth it if I have to use that.

    • @EUU100
      @EUU100 3 роки тому

      any other suggestions?

    • @NomadicBrian
      @NomadicBrian 3 роки тому

      @@EUU100 Sorry WSL is a trigger. I plunged into Linux Mint because I had Windows 10 crash for good on my Dell Inspiron. I'm comfortable with Debian packages and what I can run in docker images. Today I'm running Python in Jupyter Notebook against a MySQL database over a virtual network that maps client port to container port. I'd have to review the podcast here on schedulers and get back to you. If you can split boot right into Linux I'd do that over virtual Linux on Windows 10.

  • @thomasrayanthony4871
    @thomasrayanthony4871 4 роки тому

    Would you like to partner with my company for merch

  • @armandaske
    @armandaske 4 роки тому

    yoyoyoyoyo yo! hahahaha

  • @jonymartinez509
    @jonymartinez509 2 роки тому

    You talk to much to do a simple task

  • @huili1920
    @huili1920 Рік тому

    help!!!!
    (base) huizi@huizideMacBook-Pro scheduling-code-master % Service cron status
    zsh: command not found: Service