Jobs: recurrence workflows and lists
Remove a recurrence definition and its worker registration after attempting future-job cleanup
/a/JobRecurrence_delete
Remove a recurrence definition and its worker registration after attempting future-job cleanup.
When to use this endpoint
Remove a recurrence definition and its worker registration after attempting future-job cleanup. Use the recurrence ID, not the example job ID, unless a parameter explicitly says otherwise.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. All records resolve in the authenticated tenant. This handler has no additional Job edit-bit, department-visibility or owner check.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive recurrence ID; numeric input is coerced with intval unless stated otherwise. |
Example request
$result = FM_api('JobRecurrence_delete', ['id'=>'1042']);
Example response
{"ok":1}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id"} | ID missing/nonpositive. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Forces date to today and invokes JobRecurrence_deleteFromDate. A supplied from_now flag is still inherited by that nested request.
- Then permanently deletes the recurrence row and its global worker registration. This is not audited soft deletion of the recurrence object.
- Returns ok for an absent recurrence and does not check delete results or the cleanup response. A blocked/failed cleanup can leave jobs after the recurrence definition has gone.
- The normal cleanup retains the cached anchor, completed jobs and jobs through the supplied calendar cutoff. The operation does not promise to delete every job in the sequence.
- Mobile clients were checked separately: recurrence notes/files are synchronized through m/www syncDownloads/syncDownloadOne and notes uploads, not direct calls to this endpoint. Those intermediary contracts are not expanded by this API route.
Side effects
- Runs the job-cleanup lifecycle, then physical tenant deletion plus Core_logDeletion and global registration deletion. The deletion log is not a soft-delete marker on the recurrence row.
- No transaction spans cleanup, the row delete, deletion log and global scheduler delete; type-7 reminder cleanup is not explicitly performed here.
See it in Fieldmotion
CRM1
Jobs → Recurring Jobs, or the customer recurring-jobs table: use Delete and inspect JobRecurrence_delete. This deletes the recurrence, not all historical jobs.
CRM2
No direct canonical deletion call was found in moduleRecurring; its bulk Archive/Restore uses mapped active updates instead.
Related endpoints
JobRecurrence_deleteFromDatecleans eligible child jobs without deleting configuration.