OJS: "ScheduledTask does not implement execute()"

We’ve got a problem with OJS’ ReviewReminder service (Setup step 2.2), no reminders are sent at all. We did check the related threads since the function seems to create problems regularly, but we could not find any solution to ours - apologies if we just haven’t found it. Here goes.

In accordance with https://pkp.sfu.ca/ojs/docs/userguide/2.3.3/systemAdministartionScheduledTasks.html we set “scheduled_tasks” to “on” and included the following line in crontab:

0 6,18 * * * /usr/bin/php -c /u/home/ojstest/html/php.ini /u/home/ojstest/html/tools/runScheduledTasks.php

The respective log file (/u/home/ojstest/html/log/runScheduledTasks.log) then shows the following error:

ScheduledTask does not implement execute()!
ojs2: ScheduledTask does not implement execute()!

As far as we are able to tell, the process is as follows:

  1. runScheduledTasks.php uses
  2. scheduledTasks.xml, which includes the class
  3. ReviewReminder.inc.php, which in turn loads
  4. “import(‘lib.pkp.classes.scheduledTask.ScheduledTask’);”, which is where the error occurs:

fatalError(“ScheduledTask does not implement execute()!\n”);

What can be done about this? Thanks in advance for any and all hints.

We are running
OJS Version 2.4.4.1 (August 4, 2014 - 03:04 PM)

OS platform Linux
PHP version 5.5.32
Apache version Not available
Database driver mysql
Database server version 5.1.73

Hi @ojs_univie,

Has the code been modified? You should see an implementation of the execute() function in ReviewReminder.inc.php, which overrides the one in ScheduledTask.inc.php that raises the error message.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for your reply, our investigation does show some changes in ReviewReminder.inc.php. We’ll have to forward them to our liaison at the computer center to be sure though… Off to some more tests.