Task Scheduler runs store jobs on a schedule: downloading files, importing data, refreshing currency rates, mailing the error log and tasks of other Ka modules. You create a task once, and the scheduler runs it when it is due.
This documentation is for Task Scheduler 3.0.4.0 for OpenCart 3.
How it works
- A cron job (or an external cron service) calls the scheduler every few minutes.
- Each call takes one task: an unfinished multi-step task first, otherwise the next due task.
- A simple task runs and finishes in one call. A multi-step task (for example a large import) works step by step and continues automatically until it is finished.
- The result of the last run is saved and shown on the task statistics page. An email can be sent to the store email when a task finishes.
If nothing calls the scheduler, no tasks run. Setting up the call is described on the Cron Setup page.
Features
- Schedules: every N minutes, every hour, day, week, month or year at a set time.
- Start date and an optional end date for every task.
- Bundled tasks: download a file through FTP or HTTP, request a page URL, refresh currency rates, update rates from the European Central Bank, mail the error log. See Bundled Tasks.
- Tasks of other Ka modules appear in the task form automatically when those modules are installed (for example, import modules).
- Task chains: a task can start another task when it finishes (for example, download a CSV file and then run the import).
- Email to the administrator when a task is complete.
- Three ways to call the scheduler: a URL with a secret key, PHP from the command line, or an external cron service.
- Developers can add their own tasks. See For Developers.
A free Lite version runs tasks added by other Ka modules, but tasks cannot be created or edited in it by hand (only Active and Priority can be changed).
Requirements
- OpenCart 3.0.0.0 to 3.0.5.x.
- Ka Extensions library 4.1.1.22 or newer (free).
- A way to call the scheduler periodically: cron jobs in the hosting control panel, server crontab, or an external cron service.
- For some bundled tasks: the PHP cURL extension (HTTP downloads, page requests, ECB rates), the FTP extension (FTP downloads), ZipArchive (unpacking zip files).