Scheduling Data Jobs in OT: Cron, MQTT, and Triggers
Automation engineers increasingly run data scripts — for logging, analytics, or AI inference — alongside production. Keeping those Python jobs predictable requires industrial-grade scheduling, not just ad-hoc scripts.
Scheduling Options
- Cron: Ideal for fixed-interval batch jobs (hourly reports, backups).
- MQTT triggers: Execute scripts when specific process messages publish (e.g., batch complete).
- Edge orchestrators: Tools like Node-RED or NATS handle event routing and retries.
Design for Resilience
- Run each job in its own container or virtual environment.
- Log execution results to an OPC UA variable or database table for traceability.
- Use watchdog processes to restart failed tasks automatically.
Example Setup
A bottling plant used MQTT-based triggers to launch Python scripts that calculate OEE after each batch. The approach reduced latency from 3 minutes to 8 seconds, without adding new PLC logic.
Related Articles
- Python Next to PLCs: Safety, Sandboxing, and IPC
- When to Keep Python Off the Line: Risk-Based Rules
- Testing Python Pipelines in a Simulated Plant
Conclusion
Scheduling in OT means more than timing — it’s about traceability, determinism, and safety. MQTT and Cron together make Python jobs behave like any other industrial task.

































Interested? Submit your enquiry using the form below:
Only available for registered users. Sign In to your account or register here.