Run a saved query or an export on a schedule

Đang mở
#3,621 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
macos, swift
Lĩnh vực
databases, desktop

Hướng nghiên cứu

Read apple/AGENTS.md for the scope requirements for a new advanced tool, then inspect apple/TablePro/ViewModels/ServerDashboardViewModel.swift and the AppleScript and MCP entry points named in the issue. The proposal spans scheduling, query execution, export, notifications, safety checks, logging, and pause or resume behavior, so identify the existing module and export patterns before estimating the work. Done means a weekday schedule can write the dated CSV while TablePro is open and record each run in its log.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement platform-macos
Problem

Nothing in TablePro runs on its own. A report that has to land every morning is a saved query someone opens, runs and exports by hand. The only timer that queries a database is the Server Dashboard refresh (apple/TablePro/ViewModels/ServerDashboardViewModel.swift:25).

The scripting routes run only when something calls them: AppleScript run query (developers/applescript.mdx) and the MCP export_data tool (developers/mcp-tools.mdx), which writes only into Downloads. So a schedule today is a launchd job the user writes and keeps working.

Proposed solution
  • Schedule… on a saved query: at a time of day, on chosen weekdays, or every N minutes or hours, on the query's connection and database.
  • Each run can export its result to a chosen folder, in any format the Export dialog offers, with the date and time in the file name, and can post a notification through Settings > Notifications with Show in Finder.
  • Unattended means read-only by default. A statement that writes runs only when the schedule says so explicitly, and never on a connection whose Safe Mode asks for confirmation.
  • A run never prompts. A connection that needs a typed password, a TOTP code or a confirmation is skipped, and the run is logged as failed with the reason.
  • A run log per schedule: start, duration, row count, file written, error. Pause and Run Now on each schedule.
  • Schedules run while TablePro is open. A run missed while it was closed is either run once at the next launch or skipped, set per schedule.
  • Ships as a module, off by default, as apple/AGENTS.md (Scope) asks of a new advanced tool.

Done means a saved query set to 08:00 on weekdays writes orders-2026-10-20.csv into the chosen folder each weekday while TablePro runs, and the log shows each run.

Alternatives considered

A launchd job that runs osascript with AppleScript run query, or an MCP client on a timer calling export_data.

Platform

macOS

Related database type

N/A / General

Ngôn ngữ chính
Swift
Star
6.2k
Fork
412
Merge trung bình
3 giờ 56 phút
Pull request đã merge (30 ngày)
669

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TableProApp/TablePro

Tất cả issue của TableProApp/TablePro

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.