> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/advanced/scheduler-management.md).

# Scheduler Management

## Reset a scheduled task's internal state

> Rebuilds the scheduler's internal state for a single task from source-of-truth. The\
> concrete action dispatches on the task's trigger type:\
> &#x20;           \
> \- \*\*DateRelative:\*\* deletes all pending-trigger rows for the task, then enqueues the\
> &#x20; \`dateRelative.backfill\` scheduler task which asynchronously rescans passes and\
> &#x20; rewrites rows. Client returns immediately after the enqueue; watch the executions\
> &#x20; endpoint for the backfill's progress via the returned correlationId.\
> \- \*\*Recurrence / FixedDate:\*\* no-op in this release (reset semantics for these are not\
> &#x20; yet implemented). The response reports \`no-op-not-implemented\`.\
> &#x20;           \
> Safe to call repeatedly — enqueue uses a deterministic correlation id per\
> \`(tenant, task)\`.\
> &#x20;           \
> \## Authorization\
> Requires \`Scheduler.Manage\` scope.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"SchedulerManagement"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ResetResult":{"required":["action","taskId","triggerType"],"type":"object","properties":{"taskId":{"type":"string","description":"Task id that was reset."},"triggerType":{"type":"string","description":"Trigger discriminator, e.g. `dateRelative`, `recurrence`, `fixedDate`."},"action":{"type":"string","description":"Short summary of what happened, e.g. `backfill-enqueued`, `no-op-not-implemented`."},"rowsDeleted":{"type":["null","integer"],"description":"Number of pending-trigger rows deleted prior to backfill. `null` when the trigger type has no rows.","format":"int32"},"correlationId":{"type":["null","string"],"description":"Correlation id of the enqueued backfill task, if any. Support can trace this in the executions endpoint."}},"additionalProperties":false,"description":"Result of a task reset operation."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/scheduler/{taskId}/reset":{"post":{"tags":["SchedulerManagement"],"summary":"Reset a scheduled task's internal state","description":"Rebuilds the scheduler's internal state for a single task from source-of-truth. The\nconcrete action dispatches on the task's trigger type:\n            \n- **DateRelative:** deletes all pending-trigger rows for the task, then enqueues the\n  `dateRelative.backfill` scheduler task which asynchronously rescans passes and\n  rewrites rows. Client returns immediately after the enqueue; watch the executions\n  endpoint for the backfill's progress via the returned correlationId.\n- **Recurrence / FixedDate:** no-op in this release (reset semantics for these are not\n  yet implemented). The response reports `no-op-not-implemented`.\n            \nSafe to call repeatedly — enqueue uses a deterministic correlation id per\n`(tenant, task)`.\n            \n## Authorization\nRequires `Scheduler.Manage` scope.","parameters":[{"name":"taskId","in":"path","description":"Id of the scheduled task (as declared in scheduler.yml).","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reset accepted and dispatched","content":{"text/plain":{"schema":{"description":"Result of a task reset operation.","$ref":"#/components/schemas/ResetResult"}},"application/json":{"schema":{"description":"Result of a task reset operation.","$ref":"#/components/schemas/ResetResult"}},"text/json":{"schema":{"description":"Result of a task reset operation.","$ref":"#/components/schemas/ResetResult"}}}},"400":{"description":"Invalid taskId format","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Not authorized","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"Task not found in the tenant's scheduler configuration","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Internal server error while resetting the task"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/api-reference/advanced/scheduler-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
