Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with Altcraft Cloud SMTPIntegration with Sendsay
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for Market dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguring MongoDB log rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Custom Channelsarrow
    • Creating a Channel
        Pipelinesarrow
      • MessageScheduleListenerModerateStop
          Pipesarrow
        • HTTP RequestPackUnpackEventerSchedulerSelectorSQLStore SetStore GetLogResultError
      External Objects (Entities)Templating LanguageSending FilesPresets (Field Sets)DebuggingTechnical Limitations
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsing the aktool utilityUsers and directories engaged by the platformPlatform service monitoringProcess and mailing monitoring via Prometheus
      Extraarrow
    • System page customizationSend Message IDClickHouse History Migration GuideInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase projectENS: настройка интеграции
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new userDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Custom Channels
  • Pipelines
  • Schedule

Schedule

Schedule is a pipeline for processing deferred events. Events are written to the database using the Scheduler pipe with a specified execution time. The Schedule pipeline periodically scans the database and launches accumulated events into its pipe chain when the scheduled time arrives.

Features​

  • Event scanning occurs every SCHEDULER_PIPE_ROUTER_PERIOD seconds (default — 10).
  • The event passed to Schedule replaces the data in $origin with the value of the Scheduler pipe's params.template.
  • In $origin of the Schedule pipeline, the system field _schedule_try_count is available — a counter of event execution attempts (starting from 1). Useful for implementing retry logic with increasing delays.
caution

In Schedule, $origin is replaced with the Scheduler pipe's params.template. The original data is not available — pass everything needed (including send_message_id) through the template.

Usage example in Message​

In the Message pipeline, the Scheduler pipe passes an event to Schedule with a delay:

{
"id": 801,
"type": "scheduled",
"params": {
"pipe_id": 1,
"delay": 600,
"template": {
"camp_id": "$origin.c_id",
"send_message_id": "$origin.send_message_id",
"external_id": "$#in.data.externalId"
}
},
"outs": {
"success": 802,
"error": 803
}
}

After 600 seconds, the event will enter pipe 1 of the Schedule pipeline.

Schedule pipeline example​

Typical scenario: checking delivery status 10 minutes after sending.

[
{
"id": 1,
"type": "log",
"params": {
"message": "[Schedule] try_count: $origin._schedule_try_count, external_id: $origin.external_id",
"level": "debug"
},
"outs": {
"success": 2
}
},
{
"id": 2,
"type": "http_request",
"params": {
"method": "GET",
"timeout": 10,
"content_type": "json",
"url": "https://api.example.com/status?id=$origin.external_id",
"success_codes": [200]
},
"outs": {
"success": 3,
"error": 5
}
},
{
"id": 3,
"type": "unpack",
"outs": {
"success": 4,
"error": 5
}
},
{
"id": 4,
"type": "event",
"params": {
"channel_id": 10001,
"action_type": 100002,
"event": {
"send_message_id": "$origin.send_message_id"
}
}
},
{
"id": 5,
"type": "log",
"params": {
"message": "[Schedule Error] code: $error.code, message: $error.message",
"level": "error"
}
}
]

Here:

  1. Log (id: 1) — logs the attempt number and external_id
  2. HTTP Request (id: 2) — checks delivery status by external_id
  3. Unpack (id: 3) — unpacks the JSON response
  4. Eventer (id: 4) — registers a delivery event (deliv, action_type 100002)
  5. Log (id: 5) — logs an error if the request fails
Last updated on Jun 9, 2026
Previous
Message
Next
Listener
  • Features
  • Usage example in Message
  • Schedule pipeline example
© 2015 - 2026 Altcraft, LLC. All rights reserved.