diff --git a/app/Jobs/SendReminders.php b/app/Jobs/SendReminders.php index f5f96f1c..27ab54ca 100644 --- a/app/Jobs/SendReminders.php +++ b/app/Jobs/SendReminders.php @@ -28,6 +28,10 @@ public function handle() ->whereDoesntHave('reminder', function ($query) { $query->whereDate('sent_at', now()); }) + ->whereHas('site', function ($query) { + $query->whereYear('last_measured_at', '<', now()->year); + $query->orWhere('last_measured_at', '<', now()->subDays(31)); + }) ->with(['reminder']) ->cursor();