From 82f543a587f5336a28aae81fa3cb942218e82460 Mon Sep 17 00:00:00 2001 From: Axel <1597611+axeloz@users.noreply.github.com> Date: Mon, 20 Dec 2021 22:30:05 +0100 Subject: [PATCH] Fixing MySQL error --- app/Console/Commands/RunMonitoring.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/RunMonitoring.php b/app/Console/Commands/RunMonitoring.php index 04404bf..a04887c 100644 --- a/app/Console/Commands/RunMonitoring.php +++ b/app/Console/Commands/RunMonitoring.php @@ -53,7 +53,7 @@ class RunMonitoring extends Command // Getting pending tasks $tasks = DB::table('tasks') ->where(function($query) { - $query->whereRaw('DATE_SUB(now(), INTERVAL frequency SECOND) > last_execution'); + $query->whereRaw('DATE_SUB('.time().', INTERVAL frequency SECOND) > last_execution'); $query->orWhereNull('last_execution'); }) ->where('active', 1)