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
list | GET Chores. |
get | GET Chores('name'), with what the query expands, such as Tasks($expand=Process); a Tm1NotFoundError if there's none. |
create | Creates a chore, with its tasks if the patch has them. |
update | Changes the properties the patch sets, Active included, which IBM recommends over the deprecated activate. |
delete | DELETE Chores('name'); its processes stay. |
tasks | GET Chores('name')/Tasks, in step order. |
add_task | 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. |
update_task | Changes a task, such as its parameter values. |
delete_task | DELETE Chores('name')/Tasks(step); TM1 renumbers the later steps. |
task_process | The process the task runs. |
task_chore | The task's chore. |
execute | Runs the chore now, whether or not it's active, and returns when its tasks have run. |
activate | Schedules the chore... |
deactivate | Unschedules the chore... |
set_server_local_start_time | Sets 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) -> ChoreGET 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) -> ChorePOST 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) -> NonePATCH 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) -> NoneDELETE 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) -> ChoreTaskPOST 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) -> NonePATCH 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) -> NoneDELETE 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) -> ProcessGET 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) -> ChoreGET Chores('name')/Tasks(step)/Chore: the task's chore.
TM1 REST Navigation ChoreTask/Chore
execute
execute(name: str) -> Nonetm1.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) -> Nonetm1.Activate: schedules the chore.
.. deprecated:: 11.8.3 Patch Active with update.
TM1 REST Action Chore/Activate
deactivate
deactivate(name: str) -> Nonetm1.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) -> Nonetm1.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