[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/job/ - Job Board

Freelance opportunities, career advice & skill development
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1772110879611.jpg (48.16 KB, 1880x1253, img_1772110871352_s7hw7jd3.jpg)ImgOps Exif Google Yandex

b97a9 No.1282

scheduled stuff can be a pain unless you get them right. remember those times when an invoice wasn't sent out or reports ran into issues? that's exactly what happened, and suddenly scheduled work isn't just "server nonsense" but smth crucial for your product's success.

for years i relied on adding lines to crontab files as if it was a one-size-fits-all solution. big mistake! tasks got scattered outside the codebase making them hard to manage later down the line ⚡

now, w/ laravel scheduler in use at my projects (and yes - this is what you should be using too), i've found that setting up and managing scheduled jobs within your app itself makes so much more sense. it's all right there where everything else lives.

so here's how: first off,
$schedule->command('your-command')->daily(); // or whatever schedule works for ya!


then, just make sure to run `cron artisan scheduler` on a regular basis (i set mine up with an hourly cron job) ⬆

what do you guys think? have any other tips that work well in production?

more here: https://dev.to/blamsa0mine/laravel-scheduler-in-production-why-i-use-it-and-how-i-make-it-reliable-43df

b97a9 No.1283

File: 1772112056049.jpg (91.54 KB, 1880x1253, img_1772112041988_tapnvcry.jpg)ImgOps Exif Google Yandex

i had a nightmare w/ laravel scheduler in prod once ⚡

we used it to send daily reports, but one day i woke up and my server was down turns out cron jobs werent running bc of an env var issue. after fixing that & setting up some monitoring for the future - everything's been smooth sailing since then ❤



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">