//Do you mind answering 3 quick problem solving questions here in chat? // Question 1, look at the code below. Pls tell me the bug? $tx_list = Transaction::whereIn('method', Transaction::$retail_types) ->whereStatus('pending') ->where('created_at', '<', date("Y-m-d 14:00:00", strtotime("-3 days"))); foreach($tx_list as $tx){ $service->callbackRetailPaid($tx->xendit_external_id, 'COMPLETED'); } // Answer 1: The problem is in the date comparison in the query, date("Y-m-d 14:00:00", strtotime("-3 days")) function will return date in string but type of created at is timestamp, this is the problem here. /* Question 2: Looking at the code above, seems like it gets all transactions that were created 3 days ago.... How can we change that so we get all transactions that were created 3 days ago excluding weekend (saturday, sunday)? E.g: Transactions that were created on Monday will be picked up Thursday at 2pm, but Transactions that were created on Friday should be picked up the following Wed at 2pm $tx_list = Transaction::whereIn('method', Transaction::$retail_types) ->whereStatus('pending') ->where('created_at', '<', \Carbon\Carbon::parse(strtotime(now()->subWeekDays(3)->format('Y-m-d 14:00:00')))->timezone('Europe/Amsterdam')); use carbon now instead to create date time 3 days before for comparison foreach($tx_list as $tx){ $service->callbackRetailPaid($tx->xendit_external_id, 'COMPLETED'); } 3. Bonus: How to only pick up transactions 3 business days ago (excluding weekends and USA public holiday)? */