Skip to content

shall adopt should discover schedules #60

Description

@SYKhayyat

Problem

The schedule: grammar exists and sync can create/manage scheduled tasks, but there is no discovery path. Users must manually identify and write declarations for every cron job, systemd timer, and launchd plist on their system.

Current behavior

schedule: declarations are write-only — the user writes them, sync applies them. No detection of existing schedules.

Proposed behavior

shall adopt (or shall adopt schedules) should detect:

  • systemd timers: systemctl list-timers --all --no-pager + parsing unit files
  • User crontabs: crontab -l (per-user)
  • System crontabs: /etc/crontab, /etc/cron.d/, /etc/cron.daily/, etc.
  • launchd plists: ~/Library/LaunchAgents/, /Library/LaunchAgents/, /Library/LaunchDaemons/
  • Windows Task Scheduler: schtasks /query /fo LIST

Each detected schedule should map to a schedule: declaration with the appropriate cron or run field.

Scope questions

  • System-wide cron jobs (root) vs. user-only? Adopting root jobs could be dangerous.
  • Should launchd plists that are just app auto-updaters (Chrome, Spotify) be filtered out?
  • How to handle one-shot timers (OnCalendar with no repeat)? They don't map cleanly to schedule:.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions