Overview
The Scheduled Tasks API provides endpoints to manage background tasks in Jellyfin. These tasks handle operations like library scans, metadata refresh, log cleanup, and other maintenance operations. Administrators can list tasks, start/stop them manually, and configure their triggers.Get All Tasks
Retrieves a list of all scheduled tasks.Endpoint
Authentication
Required. User must have elevated permissions (administrator).Query Parameters
Optional filter for hidden or visible tasks
Optional filter for enabled or disabled tasks
Response
Returns an array ofTaskInfo objects, sorted by task name.
Unique identifier for the task
Display name of the task
Description of what the task does
Category grouping for the task (e.g., “Library”, “Maintenance”)
Current state of the task (Idle, Running, Cancelling)
Current progress percentage if the task is running (0-100)
Whether the task is hidden from the UI
Task key identifier
Information about the last execution of this task
Array of triggers that schedule when this task runs
Example Request
Example Request with Filters
Example Response
Response Codes
200- Tasks retrieved successfully403- User does not have permission
Get Task by ID
Retrieves information about a specific scheduled task.Endpoint
Authentication
Required. User must have elevated permissions (administrator).Path Parameters
The unique identifier of the task
Response
Returns aTaskInfo object for the specified task.
Example Request
Example Response
Response Codes
200- Task retrieved successfully404- Task not found403- User does not have permission
Start Task
Manually starts a scheduled task.Endpoint
Authentication
Required. User must have elevated permissions (administrator).Path Parameters
The unique identifier of the task to start
Response
Returns no content. The task will begin executing.Example Request
Response Codes
204- Task started successfully404- Task not found403- User does not have permission
Stop Task
Stops a currently running task.Endpoint
Authentication
Required. User must have elevated permissions (administrator).Path Parameters
The unique identifier of the task to stop
Response
Returns no content. The task will be cancelled.Example Request
Response Codes
204- Task stopped successfully404- Task not found403- User does not have permission
Update Task Triggers
Updates the triggers for a scheduled task.Endpoint
Authentication
Required. User must have elevated permissions (administrator).Path Parameters
The unique identifier of the task
Request Body
An array ofTaskTriggerInfo objects.
Trigger type: “Daily”, “Weekly”, “Interval”, “Startup”, “SystemEvent”
Time of day in ticks (for Daily/Weekly triggers). 1 hour = 36000000000 ticks
Interval in ticks (for Interval triggers)
Day of week (for Weekly triggers): “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”
Maximum runtime in ticks before auto-cancellation
Example Request - Daily at 2 AM
Example Request - Weekly on Sunday at 3 AM
Example Request - Every 6 Hours
Example Request - Multiple Triggers
Response Codes
204- Task triggers updated successfully404- Task not found403- User does not have permission
Common Task Types
Here are some common scheduled tasks you’ll find in Jellyfin:Library Tasks
- Scan Media Library - Scans for new and updated media files
- Refresh Metadata - Updates metadata for all library items
- Extract Chapter Images - Extracts images for video chapters
- Generate Trickplay Images - Creates preview thumbnails for videos
Maintenance Tasks
- Clean Cache Directory - Removes old cached files
- Clean Transcoding Directory - Cleans up temporary transcoding files
- Clean Activity Log - Removes old activity log entries
- Optimize Database - Optimizes the database for better performance
Update Tasks
- Check for Plugin Updates - Checks if any plugins have updates available
- Check for Server Updates - Checks if a new server version is available
Time Conversion Reference
Ticks are used to represent time intervals in the .NET framework. Here are common conversions:- 1 second = 10,000,000 ticks
- 1 minute = 600,000,000 ticks
- 1 hour = 36,000,000,000 ticks
- 1 day = 864,000,000,000 ticks
Common Time Values
- 12:00 AM (midnight) = 0 ticks
- 1:00 AM = 36,000,000,000 ticks
- 2:00 AM = 72,000,000,000 ticks
- 3:00 AM = 108,000,000,000 ticks
- 12:00 PM (noon) = 432,000,000,000 ticks
- 6:00 PM = 648,000,000,000 ticks
Notes
- Tasks can have multiple triggers (e.g., run daily at 2 AM AND on startup)
- Some tasks may impact server performance while running
- Tasks respect the MaxRuntimeTicks setting and will be cancelled if they exceed it
- Use the
isHiddenparameter to filter out internal system tasks from the UI - Stopping a task may take a few moments as it needs to finish its current operation gracefully