launchd-non-apple-jobs
npx machina-cli add skill IvanCampos/agents/launchd-non-apple-jobs --openclawFiles (1)
SKILL.md
1.8 KB
Launchd Non-Apple Jobs
Overview
Show the current launchd job list filtered to non-Apple labels, and create user LaunchAgents (GUI domain) for one-time or recurring schedules.
Quick Start
- List non-Apple jobs:
scripts/show_jobs.sh
- Create a one-time job:
scripts/create_job.sh --label "com.example.myjob" --command "echo hello" --once "2026-02-05 13:30"
- Create a recurring job:
scripts/create_job.sh --label "com.example.myjob" --command "echo hello" --daily "09:00"
- Remove a job:
scripts/delete_job.sh --label "com.example.myjob"
Tasks
Show non-Apple jobs
- Run
scripts/show_jobs.sh. - The output keeps the header and only non-Apple labels.
Create a one-time job
- Use
--once "YYYY-MM-DD HH:MM". - The job schedules via
StartCalendarIntervaland self-removes after the first run.
Create a recurring job
- Use one of:
--daily,--weekly,--monthly, or--interval. - The job uses
StartCalendarInterval(orStartInterval) and remains installed until removed.
Remove a job
- Run
scripts/delete_job.sh --label "<label>". - This unloads the job and moves the plist (and one-time wrapper, if present) to Trash.
Customize the filter (optional)
- If the user wants to include additional Apple-like prefixes, update the regex in
scripts/show_jobs.sh.
Resources
scripts/
show_jobs.sh: Launcheslaunchctl listand filters out Apple jobs.create_job.sh: Creates a user LaunchAgent for one-time or recurring schedules.delete_job.sh: Unloads and removes a user LaunchAgent by label.
Source
git clone https://github.com/IvanCampos/agents/blob/main/skills/launchd-non-apple-jobs/SKILL.mdView on GitHub Overview
Show your non-Apple LaunchAgent/LaunchDaemon entries and enable creating user LaunchAgents for one-time or recurring tasks. It filters Apple-labeled jobs to focus on custom, user-level automation in the GUI domain.
How This Skill Works
The tool uses scripts/show_jobs.sh to list launchd jobs and filter out Apple labels. It uses scripts/create_job.sh to create user LaunchAgents for one-time (--once) or recurring (--daily, --weekly, --monthly, or --interval) schedules, based on StartCalendarInterval or StartInterval. Removal is performed with scripts/delete_job.sh --label <label>.
When to Use It
- You want to see your current non-Apple launchd jobs (show me my jobs or show my launchd jobs).
- You specifically need non-Apple LaunchAgents created by you, not Apple-default ones.
- You require a one-time job that runs at a set date/time and then self-removes.
- You want a recurring job (daily, weekly, monthly, or interval) to run on a schedule.
- You need to remove an existing non-Apple launchd job.
Quick Start
- Step 1: List non-Apple jobs with scripts/show_jobs.sh.
- Step 2: Create a one-time job with scripts/create_job.sh --label com.example.myjob --command 'echo hello' --once 'YYYY-MM-DD HH:MM'.
- Step 3: Create a recurring job with scripts/create_job.sh --label com.example.myjob --command 'echo hello' --daily '09:00'.
Best Practices
- Filter to non-Apple labels to avoid Apple-provided items.
- Use stable, descriptive labels like com.example.myjob for easy management.
- For one-time jobs, specify an exact timestamp with --once and verify the time zone.
- For recurring jobs, choose the appropriate frequency (--daily/--weekly/--monthly/--interval) and verify the StartCalendarInterval or StartInterval settings.
- After creating or removing a job, re-run show_jobs.sh to confirm the current non-Apple list.
Example Use Cases
- List current non-Apple LaunchAgent entries: scripts/show_jobs.sh.
- Create a one-time job that echoes a message on a future date: scripts/create_job.sh --label com.example.myjob --command 'echo hello' --once '2026-02-05 13:30'.
- Create a daily reminder at 09:00: scripts/create_job.sh --label com.example.myjob --command 'echo hello' --daily '09:00'.
- Create a weekly cleanup every Sunday at 02:00: scripts/create_job.sh --label com.example.myjob --command 'cleanup.sh' --weekly 'Sun 02:00'.
- Remove a non-Apple job by label: scripts/delete_job.sh --label 'com.example.myjob'.
Frequently Asked Questions
Add this skill to your agents