Time Engine

CM PRO notranji časovni motor — cron trigger, scheduler state in run log

Time Engine je generični časovni motor za CM PRO.

Time Engine izvaja načrtovane CM PRO jobe: expiry checks, payment lifecycle, heartbeat triggers in prihodnje specializirane motorje, kot sta Price Engine in analytics snapshots. Cron, CLI in admin gumbi samo sprožijo isti scheduler core.

Engine
Enabled OK
Interval: every 10 min
Last run
2026-07-22T21:31:42+02:00 OK
20260722213141-7700fb4e
Trigger layer
Active Ready
Admin heartbeat: on · Public heartbeat: on
Cron log
Seen Log exists
2026-07-22T21:30:01+02:00

Current status

Last run
2026-07-22T21:31:42+02:00
20260722213141-7700fb4e
Health
OK
Settings
Enabled
Every 10 min
Cron log
Exists
2026-07-22T21:30:01+02:00

Manual actions

Manual runs use the same scheduler core as cron. They do not bypass job safety settings.

Business mutations and guest e-mails are controlled by the Time Engine safety layer. Use manual actions for testing, recovery and operator checks.

Job groups

accepted_inquiry_expiry
Last: 2026-07-22T21:30:01+02:00
OK
Last summary
{
    "checked": 0,
    "expired": 0,
    "awaiting_payment": null
}
payment_lifecycle_scan
Last: 2026-07-22T21:31:42+02:00
OK
Last summary
{
    "checked": 8,
    "expired": null,
    "awaiting_payment": 1
}

Trigger Layer / Heartbeat

Admin page-load heartbeat calls cm_te_maybe_wake('admin_heartbeat'). It is throttled, lock-protected and best-effort.

Trigger layer
Enabled
Admin heartbeat
Enabled
Public heartbeat
Enabled
Min interval
900 sec
Last heartbeat run
2026-07-22T21:31:41+02:00
20260722213141-7700fb4e
Last heartbeat skip
2026-07-22T21:34:58+02:00
throttled · 197 sec
Last heartbeat trigger
admin_heartbeat
This page load
Skipped
throttled
Raw heartbeat result
{
    "ok": true,
    "engine": "CM PRO Time Engine",
    "helper": "cm_te_maybe_wake",
    "version": "0.4a",
    "trigger": "admin_heartbeat",
    "now": "2026-07-22T21:34:58+02:00",
    "settings_path": "/var/www/html/app_pro/common/data/json/scheduler/settings.json",
    "state_path": "/var/www/html/app_pro/common/data/json/scheduler/heartbeat_state.json",
    "lock_path": "/var/www/html/app_pro/common/data/json/scheduler/heartbeat.lock",
    "config": {
        "enabled": true,
        "admin_heartbeat_enabled": true,
        "public_heartbeat_enabled": true,
        "min_interval_seconds": 900,
        "force": false
    },
    "skipped": true,
    "reason": "throttled",
    "last_run_at": "2026-07-22T21:31:41+02:00",
    "elapsed_seconds": 197
}

Engine & job safety settings

These settings are stored in common/data/json/scheduler/settings.json. They separate core trigger behavior from individual job safety controls.

Trigger Layer / Heartbeat

Payment lifecycle job safety

Cron / CLI diagnostics

Web UI does not edit system crontab directly. It shows the safe CLI commands. The installer writes only the managed block between CM PRO markers.

PHP
/usr/bin/php8.1
Runner
/var/www/html/app_pro/scripts/scheduler_run.php
Log
/var/www/html/app_pro/common/data/json/scheduler/cron.log

Install / update cron:

php /var/www/html/app_pro/scripts/scheduler_install_cron.php --install

Check cron installer status:

php /var/www/html/app_pro/scripts/scheduler_install_cron.php --status

Remove managed cron block:

php /var/www/html/app_pro/scripts/scheduler_install_cron.php --remove

Manual CLI run:

php /var/www/html/app_pro/scripts/scheduler_run.php

Recent runs

20260722213141-7700fb4e
2026-07-22T21:31:41+02:00
OK
payment_lifecycle_scan
20260722213001-05ac3785
2026-07-22T21:30:01+02:00
OK
accepted_inquiry_expiry payment_lifecycle_scan
20260722212001-c564f06f
2026-07-22T21:20:01+02:00
OK
accepted_inquiry_expiry payment_lifecycle_scan
20260722211001-8bb0cb7d
2026-07-22T21:10:01+02:00
OK
accepted_inquiry_expiry payment_lifecycle_scan
Diagnostics / raw API output

Manual run and refresh responses are shown here. This is intentionally below the operational dashboard.

{}