In Accounting for Kazakhstan, edition 3.0, release 3.0.74.2 of the current 3.0.74.x series, «ОчередьЗаданий» is an internal catalog that stores and tracks application jobs submitted by the configuration for background execution.
1. Identification
| Parameter | Value |
|---|---|
| Object type | Catalog |
| Name | ОчередьЗаданий |
| Full name | Справочник.ОчередьЗаданий (Catalogs.ОчередьЗаданий) |
| Synonym | Job Queue |
| Configuration | Accounting for Kazakhstan, edition 3.0, release 3.0.74.2 of the current 3.0.74.x series |
| Object class | Internal object of the scheduled and deferred jobs subsystem |
| Where to find it | Designer → Configuration → Open Configuration → Catalogs → ОчередьЗаданий. To open the list, use the navigation link e1cib/list/Справочник.ОчередьЗаданий |
Purpose. The catalog stores application jobs that are scheduled, running, or complete. The configuration uses it as its own queue. Each item links the method to call, its parameters, the schedule, the user, the execution status, and the platform background job ID.
The queue can launch data exchanges, send and receive electronic documents, run scheduled operations, generate reports, and perform data maintenance. The Electronic Invoice Information System (EIIS) handles electronic invoices (EIs), the Virtual Warehouse, and goods consignment notes (SNTs). The 1C catalog runs the corresponding application procedures in the configuration.
The configuration manages this object programmatically. Administrators use it to monitor job status, investigate errors, and manage retries. Manually editing an item's attributes without checking the associated background job can disrupt the queue's execution order.
2. Attributes and Tabular Sections
2.1 Header Attributes
| Name | Type | How it is set | Purpose |
|---|---|---|---|
| Использование | Boolean | Set by the queue | Determines whether the scheduler processes the job |
| ЗапланированныйМоментЗапуска | Date and time | Set when the job is scheduled | Stores the earliest time the job can start |
| Миллисекунды | Number | Set as needed | Specifies the start time more precisely and helps order jobs scheduled for the same time |
| СостояниеЗадания | Перечисление.СостоянияЗаданий | Updated by the queue | Stores the current job status, which can be pending, running, completed, or failed |
| ИсполняющееФоновоеЗадание | UUID | Set after the job starts | Contains the ID of the platform background job executing the application job |
| ЭксклюзивноеВыполнение | Boolean | Set when the job is queued | Specifies that jobs subject to the same exclusivity condition must not start concurrently |
| Шаблон | Справочник.ШаблоныЗаданийОчереди | Set for jobs based on a template | Links the queue item to a template for the method, parameters, and schedule |
| НомерПопытки | Number | Updated automatically | Stores the number of the current execution attempt |
| ИмяМетода | String | Set when the job is queued | Contains the name of the configuration's exported method called during execution |
| Параметры | Value Storage | Set when the job is queued | Stores the serialized parameters for the method call |
| ДатаНачалаПоследнегоЗапуска | Date and time | Set automatically | Records the actual start time of the most recent attempt |
| ДатаЗавершенияПоследнегоЗапуска | Date and time | Set automatically | Records the actual end time of the most recent attempt |
| Ключ | String | Set when the job is queued | Identifies the job and lets the queue control whether it is added again |
| ИнтервалПовтораПриАварийномЗавершении | Number | Set for retries | Stores the interval in seconds before the next attempt after a failure |
| Расписание | Value Storage | Set for recurring jobs | Stores the serialized schedule for subsequent runs |
| КоличествоПовторовПриАварийномЗавершении | Number | Set for retries | Limits the number of retries after a failure |
| ИмяПользователя | String | Set when the job is queued | Stores the infobase username under which the job runs |
The 1C platform uses the standard catalog attributes Code, Description, DeletionMark, Predefined, and Ref. The queue primarily uses the Ключ and ИсполняющееФоновоеЗадание attributes to identify jobs at the application level.
2.2 Tabular Sections
The «ОчередьЗаданий» catalog has no tabular sections in release 3.0.74.2. The method parameters and schedule are stored directly in Value Storage attributes, so they require no separate tabular section rows.
3. Forms
Administrators primarily use the forms to view the list of queue items. To see the object's forms and which ones are assigned as the main forms, go to Designer → Configuration → Open Configuration → Catalogs → ОчередьЗаданий → Forms.
| Form | Purpose |
|---|---|
| List form | Displays queue items and their attributes, including status, scheduled start time, the method to call, attempt number, and the most recent execution timestamps |
| Item form | Displays an individual queue item with its start parameters, schedule, usage flags, and retry details |
| Choice form | Used in configuration interfaces where a reference to an existing queue item must be selected |
Application code creates queue items. The forms are primarily for viewing and troubleshooting jobs. Users do not normally enter jobs manually.
4. Key Module Procedures
The catalog manager module and the queue subsystem's common modules share the execution logic. To view the exported procedures in release 3.0.74.2, go to Designer → Configuration → Open Configuration → Catalogs → ОчередьЗаданий → Manager Module. To find calls to the object, search all module source code for references to Справочник.ОчередьЗаданий.
Manager module and API for adding jobs to the queue
- Create a new queue item or find an existing item by key.
- Set the name of the method to call and pack its parameters into Value Storage.
- Set the start time, schedule, and usage mode.
- Set the retry count and the interval between attempts after a failure.
- Associate the job with a template and the user under whose account it will run.
Queue dispatcher
- Selects enabled items whose scheduled start time has arrived.
- Creates a platform background job and saves its UUID in the ИсполняющееФоновоеЗадание attribute.
- Updates the item status and records the start time of the most recent attempt.
- Records the result and end time when the attempt finishes.
- After a failure, compares the attempt number with the configured retry count and schedules the next run after the specified interval.
- After a worker process restarts, checks the queue item's status against the presence of the corresponding platform background job.
To investigate a failure, the administrator checks Ключ, ИмяМетода, НомерПопытки, the start and end times, the job status, and the background job UUID together. The method name identifies the common module that performs the application operation.
5. Posting and Register Movements
«ОчередьЗаданий» is a catalog and has no document posting mechanism. Its data describes the parameters, schedule, and status of background execution.
An application method called from the queue follows the rules of its own subsystem. For example, a job can initiate an electronic document exchange, generate a report, or run a scheduled operation. To assess the result, check the event log, the queue item's status, and the data for the operation whose method is specified in the ИмяМетода attribute.
When troubleshooting, check the queue item status and the application procedure result separately. The Completed status indicates that the call to the job mechanism has ended. Details about processed documents and messages are available in the relevant configuration subsystem.
6. Related Objects and Creation Based on Other Objects
- Справочник.ШаблоныЗаданийОчереди — the source of the template linked to the item through the Шаблон attribute.
- Перечисление.СостоянияЗаданий — the set of lifecycle statuses used in the СостояниеЗадания attribute.
- Platform background jobs — execute the jobs directly. The ИсполняющееФоновоеЗадание attribute stores the associated UUID.
- Dispatcher scheduled job — checks the queue periodically and starts items that are ready to run.
- Application subsystems — submit jobs for data exchanges, electronic documents, reports, and scheduled operations to the queue.
The internal catalog does not use the creation based on other objects feature. When a job is queued, the configuration creates the item programmatically so it can record the key, method, parameters, schedule, and retry rules together.
7. Extension Points
- Configuration extension. For additional auditing, use a configuration extension and subscribe to object write events. The handler must run quickly because items can also be written in background sessions.
- Custom background operations. Use the queue subsystem's API to add jobs, following the prescribed order for setting the key, method, parameters, and schedule.
- Monitoring. A report or external data processor can filter jobs by status, attempt number, scheduled start time, and duration of the most recent run.
- Error handling. КоличествоПовторовПриАварийномЗавершении and ИнтервалПовтораПриАварийномЗавершении determine how a specific job behaves after a failure.
- Distributed databases. The infobase's exchange plan determines which data is transferred. Manage each node's internal queue separately from the synchronized application data.
Before using an extension to change how the queue works, find all references to the catalog, its templates, and its status enumeration. This helps keep job submission, execution, completion, and retries consistent.
8. Questions and Answers
Can I manually create an item in the «ОчередьЗаданий» catalog?
In normal operation, the configuration's API adds items to the queue. Saving an item manually bypasses part of that process. The key, method name, parameters, status, schedule, and retry rules must all be set consistently.
Where can I view the job queue in release 3.0.74.2?
To view the object's structure, go to Designer → Configuration → Open Configuration → Catalogs → ОчередьЗаданий. If you have the required permissions, you can open the item list using the navigation link e1cib/list/Справочник.ОчередьЗаданий.
What should I check if a job stays in the running state for a long time?
Compare the item status, the UUID in the ИсполняющееФоновоеЗадание attribute, and the start time of the most recent run, and check whether the corresponding background job is active. Then use the ИмяМетода attribute to find the common module and review the event log entries for the same period.
How does the queue retry a job after an error?
The queue uses НомерПопытки, КоличествоПовторовПриАварийномЗавершении, and ИнтервалПовтораПриАварийномЗавершении. If another attempt is allowed, the queue schedules a new start time and increments the attempt number.
How is a template linked to a queue item?
The Шаблон attribute contains a reference to Справочник.ШаблоныЗаданийОчереди. The template defines reusable parameters for adding jobs to the queue, and the queue item stores the status and execution details of a specific job.
