where($mapPat) -> update($updateData); // 记录日志 file_put_contents(__DIR__ . '/regular_update.log', "Updated " . $name . " records at: " . date('Y-m-d H:i:s') . "\n", FILE_APPEND); } catch (Exception $e) { // 记录错误 file_put_contents(__DIR__ . '/regular_update_error.log', "Error: " . $e->getMessage() . " at: " . date('Y-m-d H:i:s') . "\n", FILE_APPEND); } // 等待5秒 sleep(5); } ?>