A simple macOS scheduler for Mole. Configure and automate Mole's clean, optimize, and update tasks using launchd.
Single self-contained script that:
- Installs Mole via Homebrew (if not already installed)
- Sets up 3 launchd jobs with configurable schedules:
- Clean (
mo clean) — removes cache files, logs, etc. - Optimize (
mo optimize) — system optimization - Update (
brew upgrade mole) — keeps Mole up to date
- Clean (
- Sends macOS notifications on completion
- Jobs run even if Mac was asleep (catches up on wake)
bash install.shDefault schedules: Clean on Sunday 2 AM, Optimize on Wednesday 3 AM, Update on Saturday noon.
Choose schedules interactively before installing:
bash install.sh --configurePresents a numbered menu for each job (Weekly / Daily / Monthly / Skip) with sensible defaults. Press Enter to accept defaults.
Show currently installed schedules and log info without modifying anything:
bash install.sh --statusRun all jobs every 2 minutes for soak testing:
bash install.sh --test-modeUnload jobs without removing plists:
bash install.sh --stopRemove all jobs and plists:
bash install.sh --uninstallPrint verbose output including plist XML and env info:
bash install.sh --debug
bash install.sh --configure --debugCheck running jobs:
sudo launchctl list | grep mole
launchctl list | grep moleView logs:
tail -f /var/log/mole/clean.log
tail -f /var/log/mole/optimize.log
tail -f /tmp/mole-update.logTest manually:
sudo launchctl kickstart system/com.mole.clean
sudo launchctl kickstart system/com.mole.optimize- macOS
- Homebrew installed
- Run as regular user (not root)
MIT — see LICENSE