Skip to main content

Internal task schedule object with comprehensive operational and administrative details

_id
string
required

Unique identifier for the task schedule (MongoDB ObjectId). Example: 6352736c628401059b37a2e2

hubId
string
required

Unique identifier for the hub where this schedule operates. Example: 634e98498ce07d29474a7e29

organizationId
string
required

Organization identifier that owns this task schedule. Example: 634e98098ce07d29474a7e22

name
string
required

Human-readable name of the task schedule. Example: Daily Morning Visit

periode
enum<string>
required

Schedule period type determining execution pattern. Example: daily

Available options:
daily,
weekly,
monthly,
byDate,
custom
flow
string
required

Flow name that this schedule executes. Example: Visit

flowId
string
required

Unique identifier for the flow. Example: 67be687c128306111e022022

task
object
required

Task configuration data specific to the selected flow

schedules
object[]
required

Schedule configuration array defining when tasks should execute

startTime
string<date-time>
required

Schedule activation start time. Example: 2022-11-02T00:00:00.000000Z

endTime
string<date-time>
required

Schedule deactivation end time. Example: 2022-11-05T23:59:59.999999Z

status
enum<string>
required

Current operational status of the schedule. Example: active

Available options:
active,
inactive,
paused,
expired
executionCount
integer
required

Total number of successful executions. Example: 45

failedCount
integer
required

Total number of failed execution attempts. Example: 2

createdBy
string
required

Email address of the user who created this schedule. Example: admin@mile.app

createdTime
string<date-time>
required

ISO 8601 timestamp when the schedule was created. Example: 2022-11-01T07:28:23.000000Z

updatedTime
string<date-time>
required

ISO 8601 timestamp when the schedule was last updated. Example: 2022-11-01T07:28:23.000000Z

isDeleted
boolean
required

Soft delete flag for data retention. Example: false

assignee
string[]

List of user email addresses assigned to execute scheduled tasks. Example: ['worker@mile.app']

frequency
enum<string> | null

Frequency unit for custom schedules. Example: daily

Available options:
daily,
weekly,
monthly
interval
integer | null

Interval multiplier for custom frequencies. Example: 2

Required range: 1 <= x <= 99
timeSchedules
string[]

Computed time schedule array for display purposes

lastExecution
string<date-time> | null

Timestamp of last successful execution. Example: 2025-01-15T07:00:00.000000Z

nextExecution
string<date-time> | null

Calculated next execution time. Example: 2025-01-16T07:00:00.000000Z

updatedBy
string | null

Email address of the user who last updated this schedule. Example: admin@mile.app

deletedTime
string<date-time> | null

Timestamp when the schedule was soft deleted. Example: null

deletedBy
string | null

Email address of user who deleted this schedule. Example: null

executionLogs
object[]

Execution history logs for monitoring and debugging

configuration
object

Advanced schedule configuration settings

metrics
object

Performance and reliability metrics

failedCode
enum<string>

Task Schedule Module business failedCode that indicate specific failure conditions or business rule violations during task schedule module operations. These codes help identify the failed operation of task schedule-related and provide standardized failure identification across the system.

Possible values:

  • sched-032: Invalid state/condition - Schedule state invalid
  • sched-033: Schedule not found - Schedule does not exist
  • sched-034: Timezone configuration failure - Invalid timezone setting
  • sched-035: Access forbidden - User lacks schedule permission
  • sched-036: Schedule creation failed - Failed to create schedule
  • sched-037: Schedule update failed - Failed to update schedule
  • sched-038: Schedule delete failed - Failed to delete schedule
  • sched-039: Schedule execution failed - Task execution failure
  • sched-040: Frequency limit exceeded - Too many executions
  • sched-041: Flow configuration failure - Invalid flow setup
  • sched-042: Time conflict failure - Schedule time overlap
  • sched-043: Dependency failure - Missing required dependencies
  • sched-044: Resource unavailable - Required resources not available
  • sched-045: Server failure - Internal server failure
Available options:
sched-032,
sched-033,
sched-034,
sched-035,
sched-036,
sched-037,
sched-038,
sched-039,
sched-040,
sched-041,
sched-042,
sched-043,
sched-044,
sched-045