Cron System — Shared Scheduled Tasks
Centralized cron/scheduled task system. Multiple modules share one cron entry. Task scheduling, retry logic, execution logging, and lock management.
One cron job for all modules
Many PrestaShop modules need background tasks — sitemap generation, feed updates, price recalculations, cache warming, email queues. Typically, each module requires its own cron job configured on the server. Install five modules, configure five cron entries.
Our Cron System centralizes this. One cron entry calls the shared endpoint, and the system dispatches tasks to every module that has registered them.
What it provides
- Task registration — modules register tasks with frequency, priority, and timeout. The system handles scheduling.
- Lock management — prevents concurrent execution of the same task, even on multi-server setups
- Retry logic — failed tasks are retried with configurable backoff
- Execution logging — every run is logged with start time, duration, status, and error output
- Priority queuing — urgent tasks (email sending) run before low-priority tasks (sitemap generation)
- Timeout protection — tasks that exceed their timeout are killed and marked as failed
How to set up
One cron entry on your server, calling one URL. All modules share it. When you install a new module, its tasks are automatically registered — no server configuration needed.
Used by 13 modules
Modules like Sitemap Builder, Google Merchant, Sales Revolution, and Search Revolution all register their background tasks through this shared system.
The numbers
- 3,400 lines of task scheduling and execution code
- 13 modules sharing one cron entry
- Lock management for safe concurrent execution
- Full execution history with duration and error tracking
← Back to Our Technology Stack