Тёмный

How to Schedule Emails in PHP - Run Automated Scripts Using CRON - Full PHP 8 Tutorial 

Program With Gio
Подписаться 56 тыс.
Просмотров 25 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 58   
@petrjenicek7514
@petrjenicek7514 2 года назад
This is my first ever comment. What you do here is absolute game changer practical knowledge, that you are giving to us for free! These topics Are really great and I have never seen them before. Thank you!!
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 💙💙
@ЕкатеринаПолчанова-д9я
To know the path doesn't mean to go through the path. And 12 years of experience Gio has will not bestow upon me on the 4th day of watching these tutorials. I am in maternity leave since 2015 and have read a lot, need some tasks. A bit overwhelmed to read in the Linkedin that Gio was consulting on Java, PHP and C++ at the same time in college. Great channel.
@ProgramWithGio
@ProgramWithGio 5 месяцев назад
Thank you 💙
@abdallakaram5376
@abdallakaram5376 2 года назад
Great master Gio im happy because you are back ❤️🌹
@omaryahia
@omaryahia 9 месяцев назад
I love this playlist, this is beyond great you are a legend for me in the field of web development 🌟
@ProgramWithGio
@ProgramWithGio 9 месяцев назад
Happy to help! Thank you 🙏
@constantinci
@constantinci 2 года назад
I'am glad to be the first one this time. Saying - another great content is just not enough. Its much more than that. Please keep on going. 😀
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 💙
@hansschuijff
@hansschuijff 2 года назад
Great lesson again, Gio. Some minor points about the github repo of this lesson... 1. I had to puzzle somewhat to get the github code (branch 3.14) started since when I started it broke on the InvoiceService class, that still calls the now non-existing EmailService->send method. I see that in branch 3.15 the InvoiceService class is removed, solving the break there. But just taking the github branch and goint to localhost:8000 was a bit confusing at the start and it took me some time to find out where it what to do. In the end just commenting the line was sufficient, since it was not really part of this lesson. 2. As of the previous lesson the .env-example file no longer is complete, since MAILER_DSN was added to the environment variables. 3. Perhaps it would be nice, when you add tables or table contents as a startposition, to add the sql for that somewhere, so the student that want to follow the examples can be sure about having a secure starting position? I have taken the result from you screen, and got it working, but having an exact reference for comparison be nice. Al in all, just some minor points, that are solvable for students that have followed you so far. But you tend to be complete in your material, so I thought to give it back. You don't say it here, but I found out that when you start this script "in the terminal" that you mean a bash terminal in a docker app? container. When I went there it seemed to work, but it wasn't my first try to get there. Normally I just use git bash for commands, but of course that doesn't work when you need a db connection using host=db. Ah well, so we learn. 🙂 Thanks again
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you & thanks for the feedback, I'll keep that in mind for future for sure. For the project that we are working on now branches are a lot more organized & SQL in form of migrations are included as well.
@AMoktar
@AMoktar Год назад
Very straight forward. Thanks Gio.
@ProgramWithGio
@ProgramWithGio Год назад
You're welcome 💙
@arun.sekher
@arun.sekher Год назад
Incredible content! Sorry that I didn't find you earlier! subscribed. 🥰
@ProgramWithGio
@ProgramWithGio Год назад
Thank you & welcome 💙
@saad_alnefa3i159
@saad_alnefa3i159 2 года назад
Thank you so much, I am still in the first section and I will continue to watch your playlist and the whole practice, I hope there is a greater part of practical examples to do so that more is understood♥️🙏🏻
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you. Yes we'll work on an app at the end
@Zubbee
@Zubbee 5 месяцев назад
Hi Gio, I'm back here. So glad I have this to watch again. But I have a question. I would like to create a record on a table at specific times of the day throughout everyday. Would you recommend using crontab or are there perhaps are other more efficient ways? Thanks in anticipation
@ProgramWithGio
@ProgramWithGio 5 месяцев назад
Yes you can use cron for that or if you are using a framework like Laravel it has built in scheduler that makes it easier to schedule such jobs
@Zubbee
@Zubbee 2 года назад
I absolutely enjoyed this. It's incredible that you showed us this. I had fun with it as I created the database and now found a way to access my database from my text/code editor. Thanks alot for this Gio
@ProgramWithGio
@ProgramWithGio 2 года назад
Fantastic. Thank you 💙
@invgreat5608
@invgreat5608 2 года назад
Best videos, thanks!
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 💙
@DonatoBencosme
@DonatoBencosme 10 месяцев назад
Just in case you wonder how the CRON container could read the script file in the PHP container, the CRON container actually had a copy of those files when he created the volumes for this container, as you can see at 14:28.
@ProgramWithGio
@ProgramWithGio 10 месяцев назад
👍👍
@benderbg
@benderbg Месяц назад
This would've been such a CRONic pain trying to figure out without Gio. I did have a slight issue with imports because this project has Email model and uses Email class from Symfony\Component\Mime\Email but I got it to work in the end.
@ProgramWithGio
@ProgramWithGio Месяц назад
glad you got it working
@memack101
@memack101 2 года назад
Greatly appreciated.
@ProgramWithGio
@ProgramWithGio 2 года назад
💙💙
@karam0101
@karam0101 Год назад
Thanks a lot Gio! Can we use this for sending newsletter for a small project, like a blog?!
@karam0101
@karam0101 Год назад
Another question: Many developers recommend not storing JSON in database, what do you think about that? Is it better to store (from) and (to) in their own columns ?? Thank you😊
@ProgramWithGio
@ProgramWithGio Год назад
You could use it yea. As for json it depends on the app & what exactly you are storing in json. I store stuff in json all the time without issues, if you do a lot of selects & filtering around those columns then json may not be most efficient, if it's some metadata that you don't access frequently then I don't see an issue with storing it in json. If your from & to are dates or address then no I would store them separately and not in json
@karam0101
@karam0101 Год назад
@ProgramWithGio okay, thank you so much 💖
@themaridv2000
@themaridv2000 Год назад
Hi Gio, thank you for this course. I got a problem and is that the status doesn't get updated even though i did it just like you
@ProgramWithGio
@ProgramWithGio Год назад
Hey, could be due to different reasons. I would need to see the code to help troubleshoot. Send me a DM on X (Twitter) with GitHub link of ur code and I can check
@DevAmirull
@DevAmirull Год назад
Thank you so much
@ProgramWithGio
@ProgramWithGio Год назад
You're most welcome
@hannanmiah1240
@hannanmiah1240 2 года назад
Nice tutorial. Keep it up.
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you, I will
@gerardorebolledo3385
@gerardorebolledo3385 2 года назад
Making art, thanks a lot
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 🙌
@elmarzougui
@elmarzougui 2 года назад
thank you
@ProgramWithGio
@ProgramWithGio 2 года назад
You're welcome
@vladislavlitvinov2790
@vladislavlitvinov2790 2 года назад
Love it
@ProgramWithGio
@ProgramWithGio 2 года назад
Thanks
@aleksandrkanygin2672
@aleksandrkanygin2672 2 года назад
Hi, are there any async options in PHP? Like async functions in js for example?
@ProgramWithGio
@ProgramWithGio 2 года назад
React PHP & Framework X I think offer async functionality. Though I haven't done much async PHP.
@jadidlar4765
@jadidlar4765 2 года назад
good job
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you
@pinedahenryandres
@pinedahenryandres 2 года назад
For some reason the cron job does not work for me!
@ProgramWithGio
@ProgramWithGio 2 года назад
Do you get any errors? DM me on Twitter and I'll try to help you troubleshoot it. Please upload your code to GitHub and share link. Also share the contents of crontab or however you set up the cron
@DigitaSkills101
@DigitaSkills101 2 года назад
How can i setup cron on xampp my system can't run docker What i need to install
@ProgramWithGio
@ProgramWithGio 2 года назад
Are you on Windows? Cron is for linux so if you are Windows you either need to use Docker or WSL. Otherwise I think Windows has scheduled tasks, though I have never set it up on Windows so not sure.
@gracetang1025
@gracetang1025 2 года назад
Would this work In older version of PHP?
@ProgramWithGio
@ProgramWithGio 2 года назад
Cron is not a PHP thing so it should. Now the script that Cron runs may or may not work in older PHP versions depending on which version that script was written in but the cron itself is tool for Unix
Далее
Automatically Schedule Python Scripts with Cron Jobs
13:25
Laravel Advanced - Task Scheduling - CRON Job
16:26
Просмотров 62 тыс.
Run a PHP Script Automatically at a Specified Time
6:47