Cron Manager: setup and help
Quick start
- Upload and install the mprcron ZIP from Module Manager.
- Open Cron Manager > Settings > Configuration and keep Enable cron execution on.
- Choose Primary trigger mode and save the settings.
- Copy Server cron command or HTTP cron URL and configure that scheduler; for cron-job.org, save the API key and create or sync the job.
- Open Modules and sync the installed modules whose tasks you need.
- Use Run on a safe task and inspect Logs.
- Wait for the scheduled trigger, then confirm a hit in Hits and updated Last run and Next run values in Tasks.
Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.
Setup manual
Install and choose a trigger
In your Back Office, open Modules > Module Manager, choose Upload a module, and upload the module ZIP. Install it, then click Configure. On older PrestaShop versions, use the corresponding Modules page.
Open Cron Manager > Settings > Configuration. Use Server cron (recommended) when your host supports scheduled PHP commands. Use cron-job.org or another external HTTP scheduler when you need a remote trigger. Front office fallback and Back office fallback need page visits. They do not provide a fixed execution time.
Install the MPR modules whose tasks you want to run. Open Modules in Cron Manager and sync their definitions. One central trigger dispatches due registered tasks. It does not discover arbitrary scripts as tasks.
Configure execution
| Setting | Initial value | What you do |
|---|---|---|
| Enable cron execution | Yes | Keep on to execute due tasks from authenticated cron calls. Turning it off keeps registrations. Calls report zero tasks. |
| Primary trigger mode | Server cron | Select the trigger you will actually configure. |
| cron-job.org API key | Empty | Enter your API key for the integrated external scheduler. A blank secret field keeps the saved key. Use its clear/disconnect controls to remove it. |
| cron-job.org interval | Hourly | Choose hourly, every 30, 15, 5 minutes, or every minute. This is the trigger interval. Each task still has its own schedule. |
In Cron endpoints, copy Server cron command, HTTP cron URL, or Shared cron token. The token is generated as 64 hexadecimal characters. Regenerating it invalidates your old commands and URLs. Update every scheduler after regeneration.
Server cron
The generated copy command uses --token=TOKEN, which the current runner accepts. For a server setup, you can instead put the token on the first line of a file outside the public web directory. Give only the scheduled PHP user read access, for example file mode 0400. Use absolute paths appropriate to your hosting:
* * * * * /usr/bin/php /path/to/prestashop/modules/mprcron/cron.php --token-file=/private/mprcron.token --max-tasks=20 --max-seconds=300 --context=cron
Do not copy these example paths literally. The PHP CLI executable must be able to load your shop and its dependencies. Command tasks also need the server to permit process execution.
HTTP scheduler
Copy the shop-generated HTTP cron URL. Its format is:
https://yourshop.com/module/mprcron/cron?token=YOUR_TOKEN
https://yourshop.com/module/mprcron/cron?token=YOUR_TOKEN&max_tasks=20&max_seconds=300
For cron-job.org, save your key and interval, then use the create/sync job control. Use Test public request to check reachability. You can pause, resume, delete, or disconnect the external job from this screen. Authentication walls, maintenance restrictions and firewalls can block remote requests.
Limits and context
A runner call defaults to 20 tasks and 300 seconds. The limits are clamped to 1 through 100 tasks and 10 through 300 seconds. These are invocation parameters, not configuration form fields. The CLI accepts --max-tasks, --max-seconds, and --context=cron|front|admin. The module front-controller endpoint executes in cron context. Do not expect its query string to change that context.
Manage tasks and modules
Use Dashboard for a summary. Tasks shows the owner module, task key, label, type, schedule, enabled state, context, priority, timeout, last run and next run. Use Run for immediate execution. Use Pause or Resume to change one task. Edit a module-defined frequency and reset it to the module default when required.
Use Modules to sync definitions, pause or resume a module's tasks, or remove registrations. Removing a module-defined registration can be reversed by syncing the owner. Removing a custom task deletes that custom definition.
Create a custom task
Your employee profile needs the corresponding task view, add, edit or delete rights for the action you use.
Open the custom task form in Tasks.
| Field | Default | Use |
|---|---|---|
| Name | Empty | Enter a descriptive label. |
| Type | URL | Choose URL, PHP callback, or CLI command. |
| Schedule | hourly:00 |
Enter a supported schedule. |
| Owner module | mprcron |
Choose the installed module responsible for the task. |
| Enabled | Yes | Disable while preparing a task you do not want scheduled yet. |
| Priority | 50 | Lower numbers run first. |
| Timeout | 55 seconds | Saved values have a minimum of 10 seconds. |
| URL | Empty | Enter an HTTP or HTTPS target for a URL task. |
| Secret token | Empty | Optional bearer token. It is added unless your headers already include Authorization. |
| Method | GET | GET, POST, PUT, PATCH or DELETE. |
| Expected HTTP status | 200 | Use the required status, or 0 to accept any 2xx or 3xx response. |
| Headers | Empty | Put one HTTP header on each line. |
| Body | Empty | Request body for POST, PUT or PATCH. |
| Callable | Empty | PHP callback such as ClassName::method or module_name::method. |
| Command | Empty | Shell command for the server CLI runner or an explicit Back Office test. |
Use Test run or Save and test run and inspect the result. An HTTP scheduler or fallback page visit does not execute command tasks. The Tasks Run action uses the explicit admin test context.
Schedules
hourly:00
daily:04:00
weekly:1:08:00
weekly:1,3:08:00
every:3600
*/15 * * * *
0 3 * * *
30 2 * * 1
Weekly day 0 is Sunday and day 1 is Monday. every:3600 uses seconds. Calendar schedules use the PHP runtime timezone. Check it against the times shown in the task list.
For a supplier import, enter Name Nightly supplier import, Type URL, Method POST, Schedule daily:02:30, and the supplier's URL. Set Expected HTTP status to 200. Add Content-Type: application/json to Headers and this Body:
{"source":"prestashop","mode":"scheduled"}
For a callable use module_name::method. For a command use an absolute command such as php /path/to/script.php.
Check execution and troubleshoot
- Use Run on one safe task. Check Logs for its status, context, duration and result preview.
- Wait for your scheduler's next trigger. Check Hits for a server or external hit, then check the task's Last run and Next run.
- If hits arrive without executions, check Enable cron execution, the task's enabled state, schedule and context. A task claimed by another runner is skipped.
- If no hits arrive, check the scheduler path, token and public reachability. A manual run only tests the task itself; your hosting scheduler still has to call the URL.
- For failed, timeout or crashed results, inspect the result and the target script. Failed runs advance their next execution with a retry delay. CLI subprocess isolation is used when available so one crashed task need not stop the batch.
Authenticated diagnostic URLs use the same endpoint:
?token=YOUR_TOKEN&action=status
?token=YOUR_TOKEN&action=health
?token=YOUR_TOKEN&action=tasks
?token=YOUR_TOKEN&action=tasks&module=mprcron
?token=YOUR_TOKEN&action=run&id_task=123
Hits distinguishes server, external, front office, Back Office, fallback and manual triggers. Logs records executions. Use Settings > Integrity for installation checks. License, Support and Update are also under Settings.
Register tasks from a module
If you maintain an MPR module, use the bundled MyPrestaRocks\Cron\CronTrait, declare tasks in getCronTasks(), and call its cron installation and uninstallation methods in your module lifecycle. A task definition can contain:
'refresh_feed' => [
'label' => 'Refresh product feed',
'callable' => 'mymodule::cronRefreshFeed',
'schedule' => 'daily:03:00',
'context' => 'cron',
'priority' => 50,
'timeout' => 120,
]
Sync the owner in Modules after changing definitions.
Disable or uninstall
Turn off Enable cron execution for a temporary stop, and check your external scheduler separately. Remove the hosting cron entry or pause/delete the external job when retiring the module. Uninstall from Module Manager. The uninstall routine unregisters Cron Manager's own tasks and removes its menu. It keeps shared cron tables because other modules can still use them.
Compatibility
Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.
Questions
No questions about this module yet
Ask anything about installation, compatibility or setup. Answers appear here.
Known Issues
11
Save and stay
Administration scripts
PrestaShop 1.6 administration links
External scheduler key removal
Custom task secret removal
Security hardening
Task list after incomplete setup
Cron execution errors
Schedule picker layout
Repeated task form dividers
Cron execution log grows without limit — fills up disk space
Every cron execution logs start time, end time, and output without any rotation. After months of operation, the log table exceeds 1GB on active stores.
Resolution note
Added automatic log rotation with a configurable retention period (default: 30 days). Old entries are purged during each cron run.
Feature Requests
4
Implemented
Custom cron tasks managed in the back office
Custom scheduled tasks
Scheduling and cron-job.org integration
One-click module updates
Changelog
v1.3.122026-09-25
- AddedAdd custom cron task management
- AddedRelease cron manager 1.2.0
- Addedself-healing infrastructure with automatic diagnostics and repair
- Addedcomplete FR/DE/ES/IT/PL translations
- ImprovedUse shared admin form panel for cron tasks
- FixedSync install integrity success handling
- FixedRelease cron install integrity scope
- FixedPrepare cron manager release
- FixedRemove duplicate custom task form dividers
Older releases
v1.3.92026-09-10
- Synced the install-integrity success handling from the shared package into the customer artifact.
- Addedthe 1.3.8 to 1.3.9 upgrade finalizer so the install-integrity snapshot refreshes cleanly.
v1.3.82026-09-04
- Separated post-install infrastructure checks from runtime monitoring so fresh installs do not fail because of old cron history.
- Reset stale monitoring and cron-job.org reachability state on fresh install, and clear obsolete reachability markers during upgrade.
- Fixedserver-cron configuration status so cron-job.org reachability is shown as not required instead of a blocking alert.
- Added1.3.7 to 1.3.8 upgrade finalization for notifier hooks and install integrity.
v1.3.72026-08-25
- Synced bundled MPR shared packages with current package sources.
- Addedlazy first-visit install integrity banner wiring for new installs and upgrades.
- Addedupgrade finalization for existing installs so standard admin tabs, hooks, schema, and integrity state are refreshed.
- Improvedconfiguration form targeting and save behavior across PrestaShop 1.7, 8, and 9.
v1.3.62026-06-16
- Addeda full custom cron task editor for URL, PHP callback, and CLI command executors.
- Addeddirect five-field cron expression input with live schedule preview for existing expressions.
- AddedAJAX test runs from the task header with inline response output and toast/alert feedback.
- Addedcron-job.org integration support for external trigger setup and synchronization.
- Improvedadvanced option and dependent-field behavior in the shared admin form UI.
v1.2.02026-05-05
- AddedCron trigger modes + cron-job.org integration
- Addedadmin menu management via MenuInstaller for streamlined module setup
- Addedself-healing integrity checks for automatic diagnostics and repair
- AddedLicense management tab with key management and renewal options
- Addedcomplete FR/DE/ES/IT/PL translations
v1.1.02026-02-18
- AddedPrestaShop 9 and Hummingbird theme compatibility
- Addedtask execution history chart showing success and failure rates over the last 30 days
- Improvedlog rotation to compress archived log files instead of deleting them outright
- Fixedpseudo-cron fallback not triggering when all page visits are served through Varnish cache
- Addedemail alert when a scheduled task fails more than a configurable consecutive number of times
v1.0.02025-05-30
- Initialrelease of MPR Cron Manager
- InitialCentral dashboard listing all registered cron tasks across installed MPR modules
- InitialSingle system cron entry replaces per-module cron setup for simpler server configuration
- InitialPseudo-cron fallback executes overdue tasks on front-end page visits when no system cron exists
- InitialPer-task execution log with last run timestamp, duration, and exit status
- InitialLog rotation with configurable retention period in days
Demo
Test the full module
- Ready demo shop Explore a ready demo shop in your browser.
- No registration No account, email or store domain needed.
By opening this demo you accept the demo terms and the privacy policy.