skipcheck

TM1 client · Docs · Processes and chores

ChoreService

from skipcheck_tm1.services import ChoreService

Chores: scheduled runs of processes, as ordered tasks. /Chores, their tasks, and running them now.

A task binds a process (ChoreTaskPatch.Builder.bind_process) and gives each of its parameters a value; its Step, its place in the chore, is TM1's to number.

Create a daily chore with one task:

# A daily chore at 02:00 UTC, inactive until it's switched on. A task gives
# every parameter of its process a value.
load_actuals = (
    ChoreTaskPatch.builder()
    .bind_process(ODataPath.of("Processes").key("Load Sales"))
    .parameters(
        [
            ChoreTaskParameterPatch.builder().name("pVersion").value("Actual").build(),
            ChoreTaskParameterPatch.builder().name("pYear").value(2026).build(),
        ]
    )
    .build()
)
nightly = (
    ChorePatch.builder()
    .name("Nightly Load")
    .start_time(datetime(2026, 1, 1, 2, 0, tzinfo=UTC))
    .dst_sensitive(False)
    .frequency(timedelta(days=1))
    .execution_mode(ChoreExecutionMode.SINGLE_COMMIT)
    .active(False)
    .tasks([load_actuals])
    .build()
)
return tm1.chores.create(nightly)

Add a task at the end, and get the step TM1 gave it:

# A task goes at the end; TM1 numbers the steps from 0
load_forecast = (
    ChoreTaskPatch.builder()
    .bind_process(ODataPath.of("Processes").key("Load Sales"))
    .parameters(
        [
            ChoreTaskParameterPatch.builder().name("pVersion").value("Forecast").build(),
            ChoreTaskParameterPatch.builder().name("pYear").value(2026).build(),
        ]
    )
    .build()
)
return tm1.chores.add_task("Nightly Load", load_forecast).step

Schedule the chore, by patching Active:

# Scheduling a chore is a patch of Active
tm1.chores.update("Nightly Load", ChorePatch.builder().active(True).build())

The asyncio flavor, skipcheck_tm1.aio, has the same methods to await, on AsyncChoreService.

Members

listGET Chores.
getGET Chores('name'), with what the query expands, such as Tasks($expand=Process); a Tm1NotFoundError if there's none.
createCreates a chore, with its tasks if the patch has them.
updateChanges the properties the patch sets, Active included, which IBM recommends over the deprecated activate.
deleteDELETE Chores('name'); its processes stay.
tasksGET Chores('name')/Tasks, in step order.
add_taskAdds a task at the end (its bound process and a value for each of the process's parameters); returns it with the Step TM1 gave it.
update_taskChanges a task, such as its parameter values.
delete_taskDELETE Chores('name')/Tasks(step); TM1 renumbers the later steps.
task_processThe process the task runs.
task_choreThe task's chore.
executeRuns the chore now, whether or not it's active, and returns when its tasks have run.
activateSchedules the chore...
deactivateUnschedules the chore...
set_server_local_start_timeSets the chore's start in the server's time zone.

list

list(query: ODataQuery | None = None, **options: Any) -> list[Chore]

GET Chores.

TM1 REST EntitySet Chores

get

get(name: str, query: ODataQuery | None = None, **options: Any) -> Chore

GET Chores('name'), with what the query expands, such as Tasks($expand=Process); a Tm1NotFoundError if there's none.

TM1 REST EntitySet Chores

create

create(chore: Any) -> Chore

POST Chores: creates a chore, with its tasks if the patch has them. It needs a name, start time, frequency and execution mode. A task must list every parameter of its process.

TM1 REST EntitySet Chores

update

update(name: str, patch: Any, etag: str | None = None) -> None

PATCH Chores('name'): changes the properties the patch sets, Active included, which IBM recommends over the deprecated activate. Adding, changing or removing a task changes the chore's ETag too. With etag, sent as If-Match. TM1 (11.8): binding Tasks in a chore PATCH appends them.

TM1 REST EntitySet Chores

delete

delete(name: str) -> None

DELETE Chores('name'); its processes stay.

TM1 REST EntitySet Chores

tasks

tasks(name: str, query: ODataQuery | None = None, **options: Any) -> list[ChoreTask]

GET Chores('name')/Tasks, in step order.

TM1 REST Navigation Chore/Tasks

add_task

add_task(name: str, task: Any) -> ChoreTask

POST Chores('name')/Tasks: adds a task at the end (its bound process and a value for each of the process's parameters); returns it with the Step TM1 gave it.

TM1 REST Navigation Chore/Tasks

update_task

update_task(name: str, step: int, patch: Any) -> None

PATCH Chores('name')/Tasks(step): changes a task, such as its parameter values.

TM1 REST Navigation Chore/Tasks

delete_task

delete_task(name: str, step: int) -> None

DELETE Chores('name')/Tasks(step); TM1 renumbers the later steps.

TM1 REST Navigation Chore/Tasks

task_process

task_process(name: str, step: int, query: ODataQuery | None = None, **options: Any) -> Process

GET Chores('name')/Tasks(step)/Process: the process the task runs.

TM1 REST Navigation ChoreTask/Process

task_chore

task_chore(name: str, step: int, query: ODataQuery | None = None, **options: Any) -> Chore

GET Chores('name')/Tasks(step)/Chore: the task's chore.

TM1 REST Navigation ChoreTask/Chore

execute

execute(name: str) -> None

tm1.Execute: runs the chore now, whether or not it's active, and returns when its tasks have run. Needs schema 10.2.2.2.

TM1 REST Action Chore/Execute

activate

activate(name: str) -> None

tm1.Activate: schedules the chore.

.. deprecated:: 11.8.3 Patch Active with update.

TM1 REST Action Chore/Activate

deactivate

deactivate(name: str) -> None

tm1.Deactivate: unschedules the chore.

.. deprecated:: 11.8.3 Patch Active with update.

TM1 REST Action Chore/Deactivate

set_server_local_start_time

set_server_local_start_time(name: str, date: _dt.date, time: _dt.time) -> None

tm1.SetServerLocalStartTime: sets the chore's start in the server's time zone. TM1 (11.8) refuses it while the chore is active ("Can't duplicate active chore", code 7): deactivate it first.

.. deprecated:: 11.8.3 Patch StartTime with update.

TM1 REST Action Chore/SetServerLocalStartTime