Jobs: scheduling and lifecycle
Shift one job by a number of minutes
/a/Job_move
Apply a relative elapsed-time shift to a job's stored start timestamp.
When to use this endpoint
Use the CRM1 calendar drag operation when the client knows the difference in minutes. Use Job_setMeetingTime for an absolute start or Job_moveDatetime for CRM2's start/due-date selector.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. Legacy edit-restriction bit 128 is enforced; client administrators retain the existing admin exception.
The primary job selection is tenant-scoped. There is no automatic schedule-conflict or assignee-ownership check. Cross-tenant follow-ups use persisted outsourcing context.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Active physical job ID. |
minutes | Integer string | No | Integer-coerced elapsed minutes, positive or negative. Missing/zero means no shift; fractions are truncated. The extra days value sent by the calendar is not read. |
Example request
$result = FM_api('Job_move', ['id' => '1042', 'minutes' => '30']);
Example response
{"ok":1,"new_meeting_time":1791887400,"hours":"1"}
new_meeting_time is the saved/calculated Unix timestamp in seconds. hours is the stored database scalar. Nested setter errors are returned instead of a fabricated success; nested warnings are preserved.
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"} | Nonpositive/missing ID. |
{"error":"no such job"} | Missing/deleted job. |
{"error":"missing or invalid parameter: meeting_time_e"} | The stored epoch is zero/empty. |
{"error":"Cannot set meeting time later than 2200"} | The resulting timestamp exceeds the supported range; the move is not saved. |
{"error":"No permission to edit"} | Restricted non-admin caller; nothing is changed. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Adds integer minutes×60 to the start epoch; daylight-saving boundaries follow elapsed time, not local calendar minutes.
- Uses the validated Job_setMeetingTime path with edit restrictions and dependent updates. Request/preloaded helper context is restored, so this call cannot leak another job's row into later operations.
- A zero shift can produce the setter's value-already-set warning. No duration/assignee change, overlap detection or pagination.
Side effects
- Attempts Job_setMeetingTime, with its completion-estimate, reminder, date-email, recurrence, outsourcing and customer-snapshot follow-ups. A zero shift can be a setter no-op.
See it in Fieldmotion
CRM1
Drag an event in Jobs Calendar; pageJobsCalendar.js sends minutes from the drop delta and uses new_meeting_time/hours to redraw.
CRM2
No direct Job_move caller was found. CRM2 calendar/timeline dragging uses Job_moveDatetime with Unix seconds instead.
Related endpoints
Job_setMeetingTimeruns dependent scheduling updates.Job_moveDatetimeselects a start or due-date move.Jobs_moveJobTimeshifts a selected batch by elapsed days.