Run Your Flask Regularly Scheduled Jobs with Cron

preview_player
Показать описание
A common need of web applications is to have a periodically running task in the background. In this video I'm going to show you what I believe is a very robust implementation that is based on the Flask CLI and the cron service.

Рекомендации по теме
Комментарии
Автор

Not sure why this video only has 8k views, this guy is a legend when it comes to easy to understand tutorials.

ppcasm
Автор

Thank u. I like ur style. Calm and confident. This makes listeners that oh this was not diffucult to learn. U are magician and making every topic easy :)

mkroven
Автор

You the Best Miguel. I am following the Mega project and I cant thank you enough.

antonyinjila
Автор

I have several servers in production using some sort of queue-based systems to perform tasks in the background. They work well but this is by far the most easy and robust method I have tried. You can access to the environment and the database as you are running the server. My new standard. Thanks Miguel for sharing this knowledge!

pvilas
Автор

Dude you're the best. I've learned so much from your Flask tutorial. I get paid to build apps now thanks to your guides!

DueDue
Автор

I have recently found your channel and I didn't know you had been uploading videos because I only checked your playlist! Now, I have so much to watch and learn from! Thanks!

hyunjeon
Автор

You are always my #1 Source when i have some problems with flask!

eduardschwarzkopf
Автор

Did i implement my own freaking cli controller before seeing this video? Perhaps!
Was the "get app context" part confusing? Definitely.
Will i throw most of it under the bus and do a lot of commits in the next view hours? Yeeees! XD

Thanks for the video <3

Streifenprinz
Автор

If i could give you a million dollars i wouldn't hesitate, thank you for the useful content u upload for free, god bless you.

monkgreensky
Автор

Miguel. Eres un grande! Te agradezco todos los videos. Leí tus dos libros. Flask web development y el mega tutorial. Uso flask en el trabajo y me siento muy cómodo. Me gustaría saber tu opinion de flask con zappa para aws lambda. Muchos saludos y gracias nuevamente.

tomasemilio
Автор

Very informative, thank you! If I want to deploy this remotely (ex. to Elastic Beanstalk) does the Cron job spin itself up if it exists in my app directory, or would I need to do some additional configuration on whatever host I am deploying to?

thebarryman
Автор

You are the monty python sorcerer <3

wduandy
Автор

Thank you Miguel but don't you need to specify something like "export FLASK_APP=flasky.py" for the flask cli commands to be accessible.?

banshiaryal
Автор

what happens if i want to add job dynamically? for example, i have an API receiving a requests, then after 5 sec i want to update the database with this request?

chrislam
Автор

if i have 50 + background job where i will write the code in flasky.py or how i manage in in a seperate blueprint and run it with well structure

nirobsarkar