Skip to content

[Cross-cutting] Add cron and launchd scheduling examples #69

Description

@markcallen

Overview

Add documentation for running cache-cleaner tools on a schedule (launchd on macOS, cron on Linux/macOS) so users can automate weekly or monthly cleanup. Covers all content previously in [mac-cache-cleaner] issue #56 Part 5.

Implementation Plan

  1. Location

    • Add docs/scheduling.md or extend README with "Scheduled Runs" section
  2. Content

    • launchd (macOS):
      • Plist example for weekly run of mac-cache-cleaner --clean --yes
      • Install: launchctl load ~/Library/LaunchAgents/com.cache-cleaner.weekly.plist
      • Log location
    • cron:
      • 0 3 * * 0 = weekly Sunday 3am
      • Example crontab with log redirection: 0 3 * * 0 /usr/local/bin/mac-cache-cleaner --clean --yes >> ~/cache-cleaner.log 2>&1
      • Example for dev-cache: dev-cache --scan ~/src --clean --yes
      • Example for git-cleaner: git-cleaner --scan ~/src --clean
      • Example for mac-cache-cleaner: mac-cache-cleaner --clean --yes
    • brew services: If applicable, document how to run periodically via Homebrew
    • Recommendations:
      • Run during low-usage hours (e.g. overnight or weekend)
      • Ensure PATH includes tool binaries
      • Log output for debugging

Acceptance Criteria

  • Documentation includes launchd plist example
  • Documentation includes cron examples for all three tools
  • Example crontab with log redirection included
  • Clear instructions for install and log paths
  • brew services noted if applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions