Scheduling & email filtering
The Leif job-scheduler and email-filter tool namespaces — registering recurring jobs (instead of crontab) and managing inbound email filters.
Two small management namespaces: Leif’s own job scheduler and email filters. Both are registries Leif owns directly.
Scheduled jobs
Leif’s internal scheduler. Use this for recurring jobs on the Leif host
rather than editing crontab — the registry is the authoritative list, and
list_scheduled_jobs always reflects current truth.
schedule_job(name, command, schedule, enabled=True)
list_scheduled_jobs()
remove_scheduled_job(job_id)
| Param | Notes |
|---|---|
name | Human label for the job |
command | What runs |
schedule | Cron-style schedule expression |
enabled | False registers it without activating |
schedule_job creates or updates by name. See
Cron Schedule — note that the hourly RS
ticket sync is a crontab entry on nvrbackup, not a Leif scheduler job, so
it won’t appear in list_scheduled_jobs.
Email filters
Manage inbound email filtering rules.
add_email_filter(sender_domain=None, sender_email=None, subject_pattern=None,
subject_match="contains", description="")
list_email_filters()
remove_email_filter(filter_id)
Match on sender_domain, sender_email, and/or a subject_pattern
(subject_match defaults to contains). description documents the rule’s
intent for later review.
Related pages
- Cron Schedule — recurring jobs across hosts (Leif scheduler vs. host crontab)
- gmail — the mailbox these filters act on
- Tools — catalog overview and routing rules