Task Scheduler: Logs and Troubleshooting

Where to look

  • Task list. Last Scheduler Start shows if cron calls the scheduler. Status and Completions show the state of each task.
  • Task Statistics. Click the Last Start value of a task to see the results of its last run.
  • Scheduler log. ka_scheduler.log in the OpenCart logs folder (usually system/storage/logs/). Every call writes "started", the task it runs, the result and warnings.
  • OpenCart error log. Problems inside tasks may appear there too. See How to see extended error information.

Useful lines in ka_scheduler.log:

Log line Meaning
WARNING: key is not valid or not found A call with a wrong or missing key.
No tasks to run The call found no due task.
Current task: taskid = N ... Task N is started or continued.
task (id: N) is finished. Task N finished successfully.
An active task is working, no need to start a new process Another call is running a step now.
Task (N) is dead. Resurrection. A step did not respond in time, the task is continued.
The task cannot run further ... The task is stopped by a limit (see below).
WARNING: module ... cannot be uploaded ... The task (task_id = N) is skipped. The task file is missing, see below.
ERROR: Unknown function result ... The task is stopped. The task returned a wrong result. Contact the developer of that task.
Wrong next run parameter for task_id = N The schedule of task N is not valid. Open and save the task.

Common problems

"Task Scheduler: wrong key." The key in the URL does not match the key on the settings page. Copy the URL from the settings page again and update the cron job, or click Re-install for the automatic cron job.

Nothing runs. - Last Scheduler Start is "Never" or old: cron does not call the scheduler. Check the cron job and the URL, see Cron Setup. Try Manual Start: Go. - The task is not active, its Start After is in the future, or its End At has passed. - Another task is unfinished (Working or In Progress). It is continued first, other tasks wait. - The cron call is too rare: each call runs one task, other due tasks wait for the next calls.

A task is stuck in Working or In Progress. The scheduler stops a task automatically when it runs longer than "Stop Task After 'N' Minutes Activity" or fails too often. You can also click Stop on the task list. See Settings.

"too many redirections for a short period of time" in the log. A task made 10 or more steps within 60 seconds and was stopped to protect the server. This means a fast multi-step task. Contact the developer of the task.

A task of a removed module. If the module that provided the task was removed, the task is skipped with a log line and other tasks keep running. Delete the task or install the module again.

Currency rates do not change. Open the task statistics, the note explains the reason. See Bundled Tasks.

The completion email does not arrive. Check that "Send E-mail to Administrator on Task Completion" is on in the settings, that Send E-Mail on Completion is checked in the task, and that the store mail works: How to configure emails in Opencart.

Hosting limits. Shared hosting may kill long PHP requests or allow cron jobs only every 15-60 minutes. Long tasks then continue as "dead" tasks and may hit the failure limit. Use the command line option if it is available, or ask the hosting to raise the limits.