Scheduled 1C and Bitrix Exchange: Auto Sync Setup

Scheduled 1C and 1C-Bitrix Exchange: Configuring Automatic Schedule A manager forgot to run the exchange on Friday evening — and all Monday customers see incorrect stock levels. Sound familiar? Even if they remember, manual launch distracts from core tasks. We encounter this regularly: manual exc

Our competencies:

Frequently Asked Questions

Scheduled 1C and 1C-Bitrix Exchange: Configuring Automatic Schedule

A manager forgot to run the exchange on Friday evening — and all Monday customers see incorrect stock levels. Sound familiar? Even if they remember, manual launch distracts from core tasks. We encounter this regularly: manual exchange is the main cause of discrepancies. Automatic scheduled exchange solves the problem entirely, but requires correct configuration in both systems. Our experience shows that after proper setup, the number of incidents drops by 80% and saves up to 10 hours per week.

Why Scheduled Exchange Matters

Without a schedule, data in the live catalog becomes stale: prices don't update, orders don't flow into 1C, stock diverges from reality. This is especially critical for companies working under 54-FZ, where fiscal data must sync strictly on time. According to 1C-Bitrix documentation, scheduled tasks via cron are the only reliable way to guarantee exchange execution at the specified time.

How to Set Up a Scheduled Task in 1C

In the UT 10/11 configuration, exchange is launched from a scheduled task: Administration → Scheduled and Background Jobs → Exchange with the site

Task parameters:

  1. Schedule: set interval (every N minutes, hourly, daily). For stock and prices — every 15–30 minutes; full catalog at night.
  2. User: specify an account with rights to exchange with the site.
  3. Retry on error: enable with a 5–10 minute pause to prevent the task from hanging.

This is the minimal configuration. You can additionally set up multiple scheduled tasks for different data types — this avoids locks and overload.

How to Avoid Errors When Configuring Cron

If the architecture involves the site periodically requesting updates from 1C (REST API), launch via a Bitrix agent:

Settings → Tools → Agents → Add agent:

\MyProject\OneC\ExchangeAgent::run(); 

Interval: 900 seconds (15 minutes) for prices and stock. The agent must execute via a real cron (/bitrix/modules/main/tools/cron_events.php), not through hits — otherwise the exchange won't run at night. A typical mistake is forgetting to set up cron, so the agent triggers only on site visits, which doesn't happen at night.

What If the Exchange Doesn't Run at Night?

Check if the system scheduler is configured to execute cron_events.php. If not, set up a cron task on the server. The command:

* * * * * php -f /path/to/site/bitrix/modules/main/tools/cron_events.php 

This guarantees the agent executes every minute. After setup, verify that the agent log shows no file access or database errors.

Monitoring Execution

Without monitoring, a configured schedule is useless — the exchange can break silently. Minimal monitoring:

  • Log of the last exchange with a timestamp in a separate table
  • Alert when no successful exchange occurs for more than X hours
  • Email/Telegram notification on errors
// Record the exchange result \Bitrix\Main\Application::getConnection()->query( "INSERT INTO b_exchange_log (CREATED_AT, STATUS, DETAILS) VALUES (NOW(), '" . ($success ? 'OK' : 'ERROR') . "', '" . $details . "')" ); 
What to remember when configuring cron? Cron should run as a user with write permissions to the file system and database access. Make sure the path to PHP is correct. For debugging, log the command output to a file.

Manual vs Automatic Exchange: Comparison

Criterion Manual Exchange Automatic Scheduled Exchange
Failure frequency High (human factor) Low (depends on setup)
Data latency Hours, sometimes days Minutes (15–30)
Employee load High (regular launch) Minimal
Monitoring None or manual Automatic with notifications

Manual exchange increases the risk of data delay by 10 times compared to automatic — and that's without considering human errors.

Separate Schedules by Data Type

Data Type Recommended Frequency
Stock and prices Every 15–30 minutes
Order statuses Every 30–60 minutes
Full catalog Once at night
New orders to 1C Every 15–30 minutes

What's Included in the Work

  • Analysis of current 1C and Bitrix configuration
  • Setup of scheduled tasks in 1C considering 54-FZ
  • Configuration of agents and cron on the site side
  • Separation of schedules by data types
  • Setup of monitoring with logs and notifications
  • Documentation of the new configuration
  • Employee training on the system
  • 48-hour test run

Typical Setup Mistakes

  • Agent doesn't run at night — real cron not configured, agent triggers only on hit.
  • Schedule too frequent — every 5 minutes for full catalog leads to server overload and locks.
  • No monitoring — an exchange error can go unnoticed for days.
  • Different data types in one task — better separate into individual scheduled tasks.

Automatic scheduled exchange with monitoring setup takes from 4 to 8 hours. Contact us for an audit of your current integration — we will propose the optimal turnkey solution. Get a free consultation.