Jobs

Long-running tasks like imports, downloads and analyses run in the background as jobs. The jobs section configures their log files and webhooks. Jobs themselves are kept in memory (the list is emptied on restart), while their logs are saved as files, by default in ./logs/jobs.

For following, cancelling and reading jobs in the app, and how webhooks work in detail, see Jobs.

Here’s an example configuration:

jobs:
  log: true
  log_path: ./logs/jobs
  webhooks:
    enabled: true
    job_trigger:
      - directory_import
      - download_album
    command: | # ntfy
      curl -d "Backup successful 😀" ntfy.sh/mytopic
  • log: Enable or disable job logging.
  • log_path: The directory where job logs are stored.
  • webhooks: Configuration for sending notifications about job status.
    • enabled: Enable or disable webhooks.
    • job_trigger: List of job types to send notifications for ("*" = all). Formerly job_types, which is still read but deprecated.
    • command: Shell command run when a matching job finishes. It runs in the background and is stopped after 30 seconds. It can use these placeholders: {{.Name}}, {{.Type}}, {{.Status}}, {{.Message}}, {{.Duration}}. See Webhooks for how they’re filled in safely and how to pass secrets.

Job Scheduling

Only one job runs at a time. Additional jobs wait in line and start automatically when the current job finishes. Webhooks are the exception: they start right away.

Job Types

TypeTriggered by
directory_importImporting a directory of audio files
calculate_metricsRecalculating the library metrics shown on the dashboard
download_trackDownloading a single track via a plugin
download_albumDownloading a full album via a plugin
download_artistDownloading all albums for an artist via a plugin
download_tracksDownloading multiple tracks in bulk
download_playlistDownloading a playlist via a plugin
analyze_acoustidRunning AcoustID fingerprint analysis on the library
analyze_lyricsRunning lyrics analysis on the library
analyze_reorganizeReorganizing library file paths
analyze_mergeMerging artists, albums, genres or tracks
webhookA webhook command run after another job

Notification Examples

Telegram

Sends a Telegram message with job details:

jobs:
  webhooks:
    enabled: true
    job_trigger:
      - directory_import
      - download_album
    command: |
      TEXT="🎵 Job {{.Name}} ({{.Type}}) {{.Status}}\n📝 {{.Message}}\n⏱️ Duration: {{.Duration}}" && \
        curl -X POST -H 'Content-Type: application/json' \
          -d "{\"chat_id\": \"<chat_id>\", \"text\": \"$TEXT\", \"parse_mode\": \"HTML\"}" \
          https://api.telegram.org/bot<bot_token>/sendMessage

ntfy

Sends a notification to an ntfy.sh topic for every job:

jobs:
  webhooks:
    enabled: true
    job_trigger:
      - "*"
    command: curl -d "Job {{.Name}} {{.Status}} 😀" ntfy.sh/mytopic

Emby

Triggers a library rescan in Emby after imports:

jobs:
  webhooks:
    enabled: true
    job_trigger:
      - directory_import
    command: curl -X POST 'http://localhost:8096/Emby/Library/Refresh?api_key=your_emby_api_key'