Get All Scheduled Tasks

There are several tasks that can run on a schedule on the Plex server. Tasks such as backing up and optimizing a database, or refreshing the metadata for the libraries are just some examples of tasks that can be run.

This API command will lists all the available tasks that can run on the Plex server, whether the tasks are enabled or not enabled to run.

URL

GET http://{ip_address}:32400/butler?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.

Response

An XML string value that lists all the available tasks on the server. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
    <ButlerTasks>
        <ButlerTask name="AutomaticUpdates" interval="1" scheduleRandomized="0" enabled="0" />
        <ButlerTask name="BackupDatabase" interval="3" scheduleRandomized="0" enabled="1" title="Backup Database" description="Create a backup copy of the server's database in the configured backup directory" />
        <ButlerTask name="ButlerTaskGenerateAdMarkers" interval="1" scheduleRandomized="0" enabled="0" />
        <ButlerTask name="ButlerTaskGenerateCreditsMarkers" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="ButlerTaskGenerateIntroMarkers" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="CleanOldBundles" interval="7" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="CleanOldCacheFiles" interval="7" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="DeepMediaAnalysis" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="GarbageCollectBlobs" interval="7" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="GarbageCollectLibraryMedia" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="GenerateAutoTags" interval="1" scheduleRandomized="0" enabled="0" />
        <ButlerTask name="GenerateBlurHashes" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="GenerateChapterThumbs" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="GenerateMediaIndexFiles" interval="1" scheduleRandomized="0" enabled="0" />
        <ButlerTask name="LoudnessAnalysis" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="MusicAnalysis" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="OptimizeDatabase" interval="7" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="RefreshEpgGuides" interval="1" scheduleRandomized="1" enabled="1" />
        <ButlerTask name="RefreshLibraries" interval="1" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="RefreshLocalMedia" interval="3" scheduleRandomized="0" enabled="1" />
        <ButlerTask name="RefreshPeriodicMetadata" interval="1" scheduleRandomized="1" enabled="1" />
        <ButlerTask name="ReverseGeocode" interval="1" scheduleRandomized="1" enabled="0" />
        <ButlerTask name="UpgradeMediaAnalysis" interval="1" scheduleRandomized="0" enabled="1" />
    </ButlerTasks>

The XML returned provides a list of the all the tasks that can run on a Plex server. Unlike many of the other API commands, this command does not return a MediaContainer element. Instead, it returns a root ButlerTasks element, and within that multiple ButlerTask elements.

Each ButlerTask element represents one task that can be run on the server.

Butler Task Attributes
AttributeDescription
nameThe name of the task.
intervalThe time interval for the task execution.
scheduleRandomizedFlag indicating the schedule for the task is random.
0 - the schedule is not random, 1 - the schedule is random.
enabledFlag indicating if the scheduled task is enabled.
0 - the scheduled task is not enabled, 1 - the scheduled task is enabled.
titleThe title of the scheduled task.
descriptionA description of the task.

The title and description attributes may not be available for all tasks.

Examples

curl -X GET http://{ip_address}:32400/butler?X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/butler?X-Plex-Token={plex_token}
response = requests.get(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/butler?X-Plex-Token={plex_token}' -Method 'GET'
Write-Output $response
Subscribe
Display