Akinon Release Notes (05/12/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Tutorials
  • ACC
    • How to Manage Projects and Services?
    • How to Use Demo Projects with ARC?
    • How to Move Apps into ACC?
    • How To Configure Database Connection in ACC?
    • How to Configure Your ACC Application with akinon.json and Procfile?
    • How to Create, Manage, Build, and Deploy Applications in ACC?
    • How to Install Applications from the App Store in ACC?
    • How to Add and Manage Domains in ACC?
    • How to Generate and Add Public Keys in ACC?
    • How to Monitor Application Resources in ACC?
    • How to Manage Users and Roles in ACC?
    • How to Integrate a BI Tool with Your Project in ACC?
  • Omnitron
    • Products & Catalogs
      • How to Add and Bulk Update Products in Omnitron?
      • How to Create Product Attributes and Attribute Sets in Omnitron?
      • How to Manage Catalogs in Omnitron?
      • How to Create and Update Price Lists in Omnitron?
      • How to Create and Update Stock Lists in Omnitron?
      • How to Create and Manage Collections in Omnitron?
    • Orders
      • How to Manage Orders in Omnitron?
      • How to Manage Cancellation and Return Requests in Omnitron?
    • Sales Channels
      • How to Manage Products in Omnitron?
      • How to Manage Registered Users Based on Sales Channel?
      • How to Create and Update Customer Groups in Omnitron?
      • Marketing
        • How to Create and Manage Campaigns in Omnitron
        • How to Create and Manage Coupons in Omnitron?
        • How to Create and Manage Bulk Coupons in Omnitron?
        • How to Create and Manage Discount Codes in Omnitron?
        • How to Configure SEO Settings in Omnitron?
        • How to Configure URL Redirects and Settings in Omnitron?​
        • How to Manage Promotions in Omnitron?
      • Content Management
        • How to Manage Widgets in Omnitron?
        • How to Manage Widget Schema in Omnitron?
        • How to Manage Flat Pages in Omnitron?
        • How to Manage Custom/Campaign Pages in Omnitron?
        • How to Manage Navigations/Menus in Omnitron?
        • How to Manage Mailing Templates in Omnitron?
      • Store Management
        • How to Manage Stores in Omnitron?
        • How to Manage Instore Store Employees in Omnitron?
        • How to Manage Instore Store from Omnitron?
        • How to Manage Store Delivery Points in Omnitron?
        • How to Manage Slots and Retail Store Groups?
      • Payment Management
        • How to Manage POS Integrations in Omnitron?
        • How to Manage Banks in Omnitron?
        • How to Manage Card Types in Omnitron?
        • How to Manage Card Settings in Omnitron?
        • How to Manage Checkout Providers in Omnitron?
        • How to Manage Payment Options in Omnitron?
      • Category Management
        • How to Automatically Assign Category Mapping Rules in Omnitron?
      • Sales Channel Settings
        • How to Configure Marketplace Attribute Mapping in Omnitron?
        • How to Manage Marketplace Mapping in Omnitron?
        • How to Manage Marketplace Operations?
        • How to Manage Address Mapping in Omnitron?
        • How to Manage Social Accounts in Omnitron?
        • How to Manage Loyalty Integration Settings?
        • How to Manage Store Stock Settings?
        • How to Manage Product List Filter Settings?
        • How to Manage Instore Settings in Omnitron?
        • How to Manage General Sorting Settings?
        • How to Manage Shipping Options in Omnitron?
        • How to Manage Delivery Options in Omnitron?
        • How to Manage Easy Return Shipping Options in Omnitron?
    • Integration
      • How to Manage Pending Products in Omnitron?
      • How to Manage City/District Mapping Error Logs in Omnitron?
    • Reports
      • How to Create and Download Reports in Omnitron?
    • Settings
      • How to Add and Configure a New Sales Channel in Omnitron?
      • How to Add and Configure a Shipping Company in Omnitron?
      • How to Create and Manage Sorting Algorithms in Omnitron?
      • How to Create and Manage Users in Omnitron?
      • How to Manage Reasons for Cancellation and Return in Omnitron?
      • How to Manage Authority Groups in Omnitron?
      • How to Manage Advanced Permission Policies and Items?
      • How to Log in to Omnitron Using OAuth2 (SSO)?
  • OMS
    • How to Set Up and Manage Locations in OMS?
    • How to Set Up Basic Configurations in OMS?
    • How to Manage Application Settings in OMS?
    • How to Add and Edit Stock Locations in OMS?
    • How to Create or Edit Distribution Scenarios in OMS?
    • How to Create or Edit Transfer Scenarios in OMS ?
    • How to Perform a Product Search in OMS?
    • How to Add or Edit a Product Stock Integration Engine in OMS?
    • How to Add or Edit Shipping Details in OMS?
    • How to Add or Edit a Webhook in OMS?
    • How to Add or Edit a State Transition in OMS?
    • How to Add or Edit a Packaging Refusal Reason in OMS?
    • How to Pull Orders from Omnitron to OMS?
    • How to Add or Edit Translatable Models in OMS?
    • How to Manage Scheduled Operations in OMS?
    • Working Logic of Scenarios
  • Instore
    • How to Install the Instore Service on an ACC Project?
    • How to Create Customer Account?
    • How to Manage Store & Staff?
    • How to Manage Instore Settings?
    • How to Create Instore Settings Via Omnitron Panel?
    • How to Customize Instore Widgets?
    • How to Configure Payment Methods in Instore?
    • Instore User Manual
      • Selling Through Instore
      • Order Refund/Cancellation Processes
      • Click & Collect Order Management (For Brands without an OMS)
      • Package Orders
      • Transfer Orders
      • Customer Profile
      • Settings
  • Integrator
    • How to Update S3 Bucket?
    • How to Manage Users in Integrator?
    • How to Create and Manage Integration Flow?
    • How to Monitor Integration Logs in Integrator?
    • How to Use the Flow Testing Screen in Integrator?
    • How to Use Alarm Services in Integrator?
    • How to Monitor Flow Performance in Integrator?
    • How to Create a Version Service in Integrator?
    • Flows
      • Login Flow
      • Product Flow
      • Stock Flow
      • Full Stock Flow
      • Price Flow
      • Full Price Flow
      • Order Flow
      • Order Status Flow
      • Order Cancel Flow
      • OMS Stock Flow
      • Whippy Stock Flow
      • Generic Proxy Flow
      • Image S3 Flow
      • Video S3 Flow
      • JOLT Mapping
      • Scripting in Flows
  • Project Zero
    • How to Configure Mini Basket?
    • How to Optimize Menu Performance?
    • How to Implement the Quickly Add to Cart Feature?
    • How to Implement Product Image Slider?
    • How to Create and Integrate a Custom Payment Option View in Checkout?
  • Marketplace Dashboard
    • How to Monitor Integration Logs in the Marketplace Dashboard?
    • How to Monitor Integration Reports in Marketplace Dashboard?
    • How to Create Alarms and Notifications in Marketplace Dashboard?
  • Akifast
    • Akifast Admin Dashboard
    • Akifast Merchant Dashboard
  • Seller Center
    • Seller
      • Settings
        • How to Manage Users in Seller Center?
        • How to Generate and Revoke Access Tokens in Seller Center?
        • How to Manage Delivery Settings in Seller Center?
      • Products
        • How to Use Offer Actions in Seller Center?
        • How to Add Single Product in Seller Center?
        • How to Add Product Offers Using Bulk Actions in Seller Center?
        • How to Manage Offers via Marketplace Catalog?
        • How to Create Revison Requests?
        • How to Use Bulk Actions in Seller Center?
        • Inventory Management
          • How to Manage Stock List in Seller Center?
          • How to Manage Price List in Seller Center?
      • Orders
        • How to Manage Orders in Seller Center?
        • How to Manage Packages in Seller Center?
        • How to Manage Cancellation & Returns in Seller Center?
      • Finance
        • Account Management
        • How to Manage Reconciliations in Seller Center?
      • Store Management
      • Messages
      • Support
    • Marketplace Owner
      • Settings
        • How to Manage Users in Seller Center?
        • How to Manage Delivery Settings in Seller Center?
        • How to Manage Offer Reject Reasons in Seller Center?
        • How to Manage Attribute Set & Category Mapping?
      • Products
        • How to Manage Offers via Marketplace Catalog?
        • How to Use Offer Actions in Seller Center?
      • Orders
        • How to Manage Orders in Seller Center?
        • How to Manage Packages in Seller Center?
        • How to Cancel or Return an Order in Seller Center?
      • Finance
        • How to Manage Reconciliations?
        • Seller Management
      • Support
      • Messages
  • Whippy Ware
    • Whippy Ware
  • Dynamic Price
    • Dynamic Price
  • How to Use Offer Reject Reasons?
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • How Scheduling Works in OMS?​
  • Tasks​

Was this helpful?

  1. OMS

How to Manage Scheduled Operations in OMS?

PreviousHow to Add or Edit Translatable Models in OMS?NextWorking Logic of Scenarios

Last updated 16 days ago

Was this helpful?

This tutorial provides information on scheduled operations in the Order Management System (OMS). The OMS uses Celery to schedule tasks for operations such as pulling orders from Omnitron, creating packages, and updating shipment statuses. This guide explains how to manage the scheduling of these tasks through environment configurations and how to adjust task timings using either the schedule or crontab approach.

How Scheduling Works in OMS?​

OMS uses Celery to perform tasks that are scheduled at specific intervals. These tasks can be configured in the Environment (ENV) file, which contains the settings that control task behavior. After making changes to the ENV file, the server must be restarted for the changes to take effect.

Each task is defined by the following key parameters:

  • env_key: Enables or disables a task (default: true).

  • crontab_env_key: Specifies the crontab syntax for setting specific task timings.

  • schedule_env_key: Specifies the time interval between task runs.

  • schedule: Defines the interval in seconds for tasks using the schedule approach.

  • crontab: Uses crontab syntax to specify when the task should run.

1. env_key

The env_key is used to enable or disable a task. Each task has a unique env_key, and by default, this is set to true, meaning the task is enabled. To disable a task, simply set the env_key value to false.

2. crontab_env_key and crontab

This key is used when you want to run a task at a specific time. A crontab consists of five components: minute, hour, day of the month, month, and day of the week. To schedule a task using this approach, you need to add crontab_env_key and crontab values in your configuration file.

3. schedule_env_key and schedule

This is used when you want the task to run repeatedly at specific time intervals. Add schedule_env_key and schedule values in the configuration file for this approach.

Difference Between Crontab and Schedule Approaches

  • Crontab is ideal for running tasks at specific times (e.g., every day at 3 AM).

  • Schedule is better for tasks that should recur at regular intervals (e.g., every hour).

Tasks​

1. GET ORDERS FROM OMNITRON​

This task pulls orders from Omnitron.

The default configuration is:

'get-omnitron-orders-cron': {
   'env_key': 'OMNITRON_ORDERS',
   'crontab_env_key': 'OMNITRON_ORDERS_CRONTAB',
   'schedule_env_key': 'OMNITRON_ORDERS_SCHEDULE',
   'task': 'oms.orders.tasks.get_orders_from_omnitron',
   'schedule': 60
}

In this example, the task runs every minute. To change this from the ENV file:

Schedule: Run every 5 minutes:

OMNITRON_ORDERS_SCHEDULE=60*5

Crontab: Run daily at 3:00 AM:

OMNITRON_ORDERS_CRONTAB=0,3,*,*,*

Disable the task:

OMNITRON_ORDERS=false

2. FULFILL WAITING ORDERS​

This task plans the orders pulled from Omnitron by starting the fulfillment process for unplanned orders, creating packages based on stock and scenario rules.

The default configuration is:

'fulfil-waiting-orders': {
   'env_key': 'FULFIL_WAITING_ORDERS',
   'crontab_env_key': 'FULFIL_WAITING_ORDERS_CRONTAB',
   'schedule_env_key': 'FULFIL_WAITING_ORDERS_SCHEDULE',
   'task': 'oms.fulfilment.tasks.fulfil_waiting_orders',
   'schedule': 60
}

In this example, the task runs every minute. To change this from the ENV file:

Schedule: Run every 5 minutes:

FULFIL_WAITING_ORDERS_SCHEDULE=60*5

Crontab: Run daily at 3:00 AM:

FULFIL_WAITING_ORDERS_CRONTAB=0,3,*,*,*

Disable the task:

FULFIL_WAITING_ORDERS=false

3. FULFILL RE-PLANNING ORDERS​

This task replans packages in the following states:

  • needs_replan

  • out_of_stock

  • defective_product

  • unavailable

It restarts the fulfillment process for packages marked with any of these states.

The default configuration is:

'fulfil-replanning-orders': {
   'env_key': 'FULFIL_REPLANNING_ORDERS',
   'crontab_env_key': 'FULFIL_REPLANNING_ORDERS_CRONTAB',
   'schedule_env_key': 'FULFIL_REPLANNING_ORDERS_SCHEDULE',
   'task': 'oms.fulfilment.tasks.fulfil_replaning_orders',
   'schedule': 60 * 60
}

In this example, the task runs every hour. To change this from the ENV file:

Schedule: Run every 5 hours:

FULFIL_REPLANNING_ORDERS_SCHEDULE=60*60*5

Crontab: Run daily at 3:00 AM:

FULFIL_REPLANNING_ORDERS_CRONTAB=0,3,*,*,*

Disable the task:

FULFIL_REPLANNING_ORDERS=false

4. RENEW OUT-OF-STOCK PACKAGES​

This task replans packages in the following states:

  • out_of_stock

  • defective_product

It restarts the fulfillment process for packages marked with any of these states.

The default configuration is:

'renew-out-of-stock-packages-cron': {
   'env_key': 'RENEW_OUT_OF_STOCK_PACKAGES',
   'crontab_env_key': 'RENEW_OUT_OF_STOCK_PACKAGES_CRONTAB',
   'schedule_env_key': 'RENEW_OUT_OF_STOCK_PACKAGES_SCHEDULE',
   'task': 'oms.fulfilment.tasks.retry_out_of_stock_packages',
   'schedule': 3 * 60 * 60
}

In this example, the task runs every 3 hours. To change this from the ENV file:

Schedule: Run every 5 hours:

RENEW_OUT_OF_STOCK_PACKAGES_SCHEDULE=60*60*5

Crontab: Run daily at 3:00 AM:

RENEW_OUT_OF_STOCK_PACKAGES_CRONTAB=0,3,*,*,*

Disable the task:

RENEW_OUT_OF_STOCK_PACKAGES=false

5. RENEW OUT-OF-STOCK TRANSFER ORDERS​

This task replans transfer orders in the following state:

  • out_of_stock

It restarts the fulfillment process for packages marked with this state.

The default configuration is:

'renew-out-of-stock-transfers-cron': {
   'env_key': 'RENEW_OUT_OF_STOCK_TRANSFERS',
   'crontab_env_key': 'RENEW_OUT_OF_STOCK_TRANSFERS_CRONTAB',
   'schedule_env_key': 'RENEW_OUT_OF_STOCK_TRANSFERS_SCHEDULE',
   'task': 'oms.fulfilment.tasks.retry_out_of_stock_transfers',
   'schedule': 3 * 60 * 60
}

In this example, the task runs every 3 hours. To change this from the ENV file:

Schedule: Run every 5 hours:

RENEW_OUT_OF_STOCK_TRANSFERS_SCHEDULE=60*60*5

Crontab: Run daily at 3:00 AM:

RENEW_OUT_OF_STOCK_TRANSFERS_CRONTAB=0,3,*,*,*

Disable the task:

RENEW_OUT_OF_STOCK_TRANSFERS=false

6. DAILY CLEAR INVENTORY DISCREPANCIES​

A package item can be marked as out-of-stock in the OMS. In such cases, a reservation record may be added for the product at the package's location, with the reservation type set as "inventory discrepancy". This prevents another package containing the same product from being created at that location.

This task clears inventory discrepancy reservations that prevent duplicate package creation.

The default configuration is:

'daily-clear-inventory-discrepancies': {
   'env_key': 'DAILY_CLEAR_INVENTORY_DISCREPANCIES',
   'crontab_env_key': 'DAILY_CLEAR_INVENTORY_DISCREPANCIES_CRONTAB',
   'schedule_env_key': 'DAILY_CLEAR_INVENTORY_DISCREPANCIES_SCHEDULE',
   'task': 'oms.reservations.tasks.clear_inventory_discrepancies',
   'crontab': '*/60,*,*,*,*'
}

In this example, the task runs every 60 minutes (1 hour). To change this from the ENV file:

Schedule: Run every 2 hours:

DAILY_CLEAR_INVENTORY_DISCREPANCIES_SCHEDULE=60*60*2

Crontab: Run daily at 3:15 AM:

DAILY_CLEAR_INVENTORY_DISCREPANCIES_CRONTAB=15,3,*,*,*

Disable the task:

DAILY_CLEAR_INVENTORY_DISCREPANCIES=false

7. UPDATE TRACKING INFORMATIONS​

This task is used to check cargo status of the packages.

The default configuration is:

'update-tracking-informations': {
   'env_key': 'UPDATE_TRACKING_INFORMATIONS',
   'crontab_env_key': 'UPDATE_TRACKING_INFORMATIONS_CRONTAB',
   'schedule_env_key': 'UPDATE_TRACKING_INFORMATIONS_SCHEDULE',
   'task': 'oms.shipments.tasks.update_all_tracking_information',
   'crontab': '0,2,*,*,*'
}

In this example, the task runs every day at 02:00 AM. To change this from the ENV file:

Schedule: Run every 4 hours:

UPDATE_TRACKING_INFORMATIONS_SCHEDULE=60*60*4

Crontab: Run daily at 3:30 AM:

UPDATE_TRACKING_INFORMATIONS_CRONTAB=30,3,*,*,*

Disable the task:

UPDATE_TRACKING_INFORMATIONS=false

8. UPDATE TRACKING INFORMATIONS SEVEN DAYS​

This task is used to check cargo status of the packages for the last seven days.

The default configuration is:

'update-tracking-informations-seven-days': {
   'env_key': 'UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS',
   'crontab_env_key': 'UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS_CRONTAB',
   'schedule_env_key': 'UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS_SCHEDULE',
   'task': 'oms.shipments.tasks.update_all_seven_days_tracking_information',
   'schedule': 4 * 60 * 60
}

In this example, the task runs every 4 hours. To change this from the ENV file:

Schedule: Run every 3 hours:

UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS_SCHEDULE=60*60*3

Crontab: Run daily at 4:30 AM:

UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS_CRONTAB=30,4,*,*,*

Disable the task:

UPDATE_TRACKING_INFORMATIONS_SEVEN_DAYS=false

9. UPDATE TRANSFER SHIPMENTS TRACKING INFORMATIONS​

This task is used to check the cargo status of transfer orders.

The default configuration is:

'update-transfer-shipments-tracking-informations': {
   'env_key': 'UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS',
   'crontab_env_key': 'UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS_CRONTAB',
   'schedule_env_key': 'UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS_SCHEDULE',
   'task': 'oms.shipments.tasks.update_all_transfer_order_tracking_information',
   'schedule': 4 * 60 * 60
}

In this example, the task runs every 4 hours. To change this from the ENV file:

Schedule: Run every 3 hours:

UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS_SCHEDULE=60*60*3

Crontab: Run daily at 4:30 AM:

UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS_CRONTAB=30,4,*,*,*

Disable the task:

UPDATE_TRANSFER_SHIPMENTS_TRACKING_INFORMATIONS=false

10. UNDELIVERED WHISPERER TASKS​

This task is used to resend undelivered webhooks.

The default configuration is:

'undelivered-whisperer-tasks': {
   'env_key': 'UNDELIVERED_WHISPERER_TASKS',
   'crontab_env_key': 'UNDELIVERED_WHISPERER_TASKS_CRONTAB',
   'schedule_env_key': 'UNDELIVERED_WHISPERER_TASKS_SCHEDULE',
   'task': 'whisperer.tasks.undelivered_event_scanner',
   'crontab': '*/15,*,*,*,*'
}

In this example, the task runs every 15 minutes, such as at 20:45, 21:00, 21:15, 21:30, and 21:45…

To change this from the ENV file:

Schedule: Run every 30 minutes:

UNDELIVERED_WHISPERER_TASKS_SCHEDULE=60*30

Crontab: Run every 30th minutes, such as at 20:30, 21:00, and 21:30:

UNDELIVERED_WHISPERER_TASKS_CRONTAB=*/30,*,*,*,*

Disable the task:

UNDELIVERED_WHISPERER_TASKS=false

11. DB MAINTENANCE​

This task performs maintenance on specific database tables (VACUUM and ANALYZE).

The default configuration is:

'db-maintenance': {
   'env_key': 'DB_MAINTENANCE',
   'crontab_env_key': 'DB_MAINTENANCE_CRONTAB',
   'schedule_env_key': 'DB_MAINTENANCE_SCHEDULE',
   'task': 'oms.base.tasks.db_maintenance',
   'crontab': '0,0,*,*,*'
}

In this example, the task runs every day at midnight (00:00 AM)

To change this from the ENV file:

Schedule: Run every day:

DB_MAINTENANCE_SCHEDULE=60*60*24

Crontab: Run daily at 03:00 AM:

DB_MAINTENANCE_CRONTAB=0,3,*,*,*

Disable the task:

DB_MAINTENANCE=false

12. ARCHIVE OLD AUDIT EVENTS​

This task archives audit event logs older than 120 days.

The default configuration is:

"archive-old-audit-events": {
   'env_key': 'ARCHIVE_OLD_AUDIT_EVENTS',
   'crontab_env_key': 'ARCHIVE_OLD_AUDIT_EVENTS_CRONTAB',
   'schedule_env_key': 'ARCHIVE_OLD_AUDIT_EVENTS_SCHEDULE',
   'task': "django_audit_events.tasks.archive_old_audit_events",
   'crontab': '30,12,*,*,*',
   'args': (),
   'kwargs': {"older_than": 120}
}

In this example, the task runs daily at 00:30 PM. To change this from the ENV file:

Schedule: Run every 12 hours:

ARCHIVE_OLD_AUDIT_EVENTS_SCHEDULE=60*60*12

Crontab: Run daily at midnight:

ARCHIVE_OLD_AUDIT_EVENTS_CRONTAB=0,0,*,*,*

Disable the task:

ARCHIVE_OLD_AUDIT_EVENTS=false

13. PROCESS CANCELLATION PLANS​

This task processes cancellation plans pulled from Omnitron.

The default configuration is:

"process-cancellation-plans": {
   'env_key': 'PROCESS_CANCELLATION_PLANS',
   'crontab_env_key': 'PROCESS_CANCELLATION_PLANS_CRONTAB',
   'schedule_env_key': 'PROCESS_CANCELLATION_PLANS_SCHEDULE',
   'task': "oms.orders.tasks.process_cancellation_plans",
   'schedule': 60 * 60
}

In this example, the task runs every hour.

To change this from the ENV file:

Schedule: Run every 2 hours:

PROCESS_CANCELLATION_PLANS_SCHEDULE=60*60*2

Crontab: Run daily at 03:00 PM:

PROCESS_CANCELLATION_PLANS_CRONTAB=0,15,*,*,*

Disable the task:

PROCESS_CANCELLATION_PLANS=false

14. RERUN PLANS FOR CANCELLATION WAITING PACKAGES​

This task restarts the cancellation process for packages in the cancellation_waiting state depending on the situation.

The default configuration is:

"rerun-plans-for-cancellation-waiting-packages": {
   'env_key': 'RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES',
   'crontab_env_key': 'RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES_CRONTAB',
   'schedule_env_key': 'RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES_SCHEDULE',
   'task': "oms.orders.tasks.rerun_plans_for_cancellation_waiting_packages",
   'schedule': 60 * 60
}

In this example, the task runs every hour.

To change this from the ENV file:

Schedule: Run every 2 hours:

RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES_SCHEDULE=60*60*2

Crontab: Run daily at 03:00 PM:

RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES_CRONTAB=0,15,*,*,*

Disable the task:

RERUN_PLANS_FOR_CANCELLATION_WAITING_PACKAGES=false

15. UPDATE ORDER EXECUTION PLAN CONTEXT​

This task updates the context of OrderExecutionPlan for packages with a state ≥ 450 and plans created within the last 3 months.

The default configuration is:

"update-order-execution-plan-context": {
   'env_key': 'UPDATE_ORDER_EXECUTION_PLAN_CONTEXT',
   'crontab_env_key': 'UPDATE_ORDER_EXECUTION_PLAN_CONTEXT_CRONTAB',
   'schedule_env_key': 'UPDATE_ORDER_EXECUTION_PLAN_CONTEXT_SCHEDULE',
   'task': "oms.fulfilment.tasks.update_order_execution_plan_context",
   'crontab': '0,0,*,*,*' 
}

In this example, the task runs daily at midnight (00:00 AM).

To change this from the ENV file:

Schedule: Run every two hours:

UPDATE_ORDER_EXECUTION_PLAN_CONTEXT_SCHEDULE=60*60

Crontab: Run daily at 03:00 AM:

UPDATE_ORDER_EXECUTION_PLAN_CONTEXT_CRONTAB=0,3,*,*,*

Disable the task:

UPDATE_ORDER_EXECUTION_PLAN_CONTEXT=false

16. WHISPERER TRIGGER EVENT QUEUE EVENTS​

This task processes delayed events in the EventQueue model, delivering the relevant events. Its purpose is to handle EventQueue records that were modified a specific time ago (before a configurable delay) and trigger the events linked to those records.

The default configuration is:

'whisperer_trigger_event_queue_events': {
   'env_key': 'WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS',
   'crontab_env_key': 'WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS_CRONTAB',
   'schedule_env_key': 'WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS_SCHEDULE',
   'task': 'whisperer.tasks.trigger_event_queue_events',
   'schedule': 60 * 15,
}

In this example, the task runs every 15 minutes.

To change this from the ENV file:

Schedule: Run every 30 minutes:

WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS_SCHEDULE=60*30

Crontab: Run at the 30th minute of each hour (e.g., 20:00, 20:30, 21:00):

WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS_CRONTAB=*/30,*,*,*,*

Disable the task:

WHISPERER_TRIGGER_EVENT_QUEUE_EVENTS=false

17. DELETE OLD WEBHOOK REQUEST RECORDS​

This task deletes old webhook request records.

The default configuration is:

'delete_old_webhook_request_records': {
   'env_key': 'DELETE_OLD_WEBHOOK_REQUEST_RECORDS',
   'crontab_env_key': 'DELETE_OLD_WEBHOOK_REQUEST_RECORDS_CRONTAB',
   'schedule_env_key': 'DELETE_OLD_WEBHOOK_REQUEST_RECORDS_SCHEDULE',
   'task': 'oms.integrations.tasks.delete_old_webhook_request_records',
   'schedule': 60 * 2,
}

In this example, the task runs every 2 minutes.

To change this from the ENV file:

Schedule: Run every 10 minutes:

DELETE_OLD_WEBHOOK_REQUEST_RECORDS_SCHEDULE=60*10

Crontab: Run at the 15th minute of each hour (e.g., 20:00, 20:15, 20:30):

DELETE_OLD_WEBHOOK_REQUEST_RECORDS_CRONTAB=*/15,*,*,*,*

Disable the task:

DELETE_OLD_WEBHOOK_REQUEST_RECORDS=false

18. AUTO RUN SHIP-THE-PACKAGE COMMAND​

This task automatically runs the SHIP_THE_PACKAGE command for packages in the packed state. It checks packages with a shipment record, verifies the shipment status, and runs the command accordingly, updating the package's status.

The default configuration is:

'auto_run_ship_the_package_command': {
   'env_key': 'AUTO_RUN_SHIP_THE_PACKAGE_COMMAND',
   'crontab_env_key': 'AUTO_RUN_SHIP_THE_PACKAGE_COMMAND_CRONTAB',
   'schedule_env_key': 'AUTO_RUN_SHIP_THE_PACKAGE_COMMAND_SCHEDULE',
   'task': 'oms.shipments.tasks.auto_run_ship_the_package_command',
   'schedule': 2 * 60 * 60,
}

In this example, the task runs every 2 hours.

To change this from the ENV file:

Schedule: Run every 4 hours:

AUTO_RUN_SHIP_THE_PACKAGE_COMMAND_SCHEDULE=60*60*4

Crontab: Run daily at 03:00 AM:

AUTO_RUN_SHIP_THE_PACKAGE_COMMAND_CRONTAB=0,3,*,*,*

Disable the task:

AUTO_RUN_SHIP_THE_PACKAGE_COMMAND=false
​