Oracle Retail8 min readBy Priyanshu Pandey

Registering and Scheduling Custom Batch Scripts in RMS

How to register custom shell scripts and PL/SQL procedures into the Oracle RMS batch framework and schedule them via POM.

Phase 8 · Integration & Batches

How to integrate your custom logic into the official Oracle RMS nightly run.

8 min read📅Aug 19, 2026✍️Priyanshu Pandey📚Oracle RMS Series
JOINING THE NIGHTLY RUN

Why Register Custom Batches?

Once you've built your custom staging tables and written your PL/SQL validation framework, you need a way to actually run it automatically every night.

You could just run it on a standard Linux cron job, but that is highly dangerous. What if your custom cron job kicks off right in the middle of the RMS saldly (Stock Ledger) batch? You could cause massive deadlocks or data corruption.

Custom batches must be integrated into the official RMS batch dependency tree. They must run after the data they need is ready, and before downstream batches that rely on them.

THE WRAPPER

The Wrapper Script

Oracle RMS expects batches to behave in a specific way—they must return specific exit codes (0 for success, non-zero for failure) and log to standard directories.

To execute your PL/SQL package, you should wrap it in a standard Bash script.

Bash Wrapper for PL/SQL
SQL
#!/bin/bash
# Script Name: cust_sales_validator.sh

# Source standard RMS environment variables
. $MMHOME/oracle/proc/bin/rms_env_vars.sh

sqlplus -s $UP @$MMHOME/cust/sql/run_validator.sql

EXIT_CODE=$?

if [ $EXIT_CODE -ne 0 ]; then
    echo "ERROR: cust_sales_validator failed."
    exit 1
else
    echo "SUCCESS: cust_sales_validator completed."
    exit 0
fi
POM

POM (Process Orchestration & Monitoring)

In modern Oracle Retail Cloud environments, the traditional schedulers (like Control-M or Autosys) have been replaced by POM (Process Orchestration and Monitoring).

To schedule your wrapper script in POM:

  1. Register the Job: You define a new Job in the POM UI, pointing to your wrapper script.
  2. Define Dependencies: You explicitly state that your Job requires posupld.pc (Sales Upload) to complete successfully before it can run.
  3. Add to Schedule: You place your Job into the nightly batch cycle flow.

If your script exits with a 1 (failure), POM will pause the batch run, alert the on-call team, and prevent any dependent jobs from starting until the issue is resolved.

Key Takeaways

  • Never use standard cron jobs for RMS integration batches; you must respect dependencies.
  • Wrap PL/SQL executions in Bash scripts that return proper exit codes.
  • Use POM (or your enterprise scheduler) to interlock your custom job with standard RMS programs.
RetailCoder
All systems operational
v1.0 Live

RC:OMS

Multi-channel order management with double-entry inventory ledger. Amazon, Flipkart, Shopify, WooCommerce — one source of truth.

Launch demo →
v1.0 Live

RC:Storefront

Self-hosted headless e-commerce. Your server, your data, zero transaction fees. Native RC:OMS inventory sync.

Visit Storefront →
Pipeline

RC:Pulse

AI-powered retail analytics and demand forecasting — built natively on top of your RC:OMS and Storefront data.

Request early access →
Built in India 🇮🇳  ·  Architected by Priyanshu PandeyTalk to an engineer →