rebuildSearchIndex, job_runner, task_runner and cron

Hello All,

This week I just ran a test update of a small journal we have here, from 3.3.0-21 to 3.5.0-4. While the update itself ran fine, there are still problems with rebuilding the search index and cron jobs.

Running php tools/rebuildSearchIndex.php returned this:

Clearing index … done
Indexing “Annual Review of Biomedical Sciences” … 168 articles scheduled for indexation

As I ran it twice, now there are 284 queued PKP\jobs\submissions\UpdateSubmissionSearchJob in my queued jobs list.

Now, in my config.inc.php I have:

job_runner = Off

and

task_runner = Off

And have

/php lib/pkp/tools/scheduler.php run

Configured via cron

The output of the cron job is:

2026-02-11 16:35:01 Running [PKP\task\ProcessQueueJobs] … 4.59ms DONE

End even if it runs once every minute, no jobs are removed from the queue.

I remember that when I ran rebuildSearchIndex.php job_runner and task_runner were set no On, so maybe this is why those jobs are queued.

php lib/pkp/tools/scheduler.php list

Does not show UpdateSubmissionSearchJob on the list.

config.inc.php says:

; Use of the built-in job runner is highly discouraged for high-volume
; sites. Instead, a worker daemon or cron job should be configured
; to process jobs off the application’s main thread.

and also says

; Use of the built-in scheduled task runner is strongly discouraged for high-volume
; sites. Use your operating system’s task scheduler instead, and configure
; it to run the task scheduler every minute.

As my target is to upgrade a much, much bigger OJS portal, I would like to avoid using this things and rely only on cron, if possible.

What is the best way to clear this jobs and reindex everything? Do I really need job_runner and task_runner?

Regards,

Oberdan

Maybe the problem is related to this:

For 3.5+, to make job run via schedule task, we have introduced a new config as

; Controls whether queued jobs should be processed by the task scheduler.
; This setting has no effect when the job_runner and the [schedule].task_runner are enabled,
; on this situation the jobs will be processed solely by the job runner.
process_jobs_at_task_scheduler = Off

see at ojs/config.TEMPLATE.inc.php at stable-3_5_0 · touhidurabir/ojs · GitHub

As it’s a upgrade, this is probably not set in the config.inc.php so it needed to be added and enabled . that should do it .

but the best approach is to use the queue worker as described at https://docs.pkp.sfu.ca/admin-guide/en/deploy-jobs .

BTW, the Queue running via CLI worker does not trigger plugin hooks · Issue #9345 · pkp/pkp-lib · GitHub is a bug but pretty sure it’s not what you are facing .

Regards
PKP Dev Team

Hello @touhidur ,

Running

php lib/pkp/tools/jobs.php work

Did the trick. I guess I’ll have to read all the admin documentation again for this version, several things are now different.

Just one more thing: the whole process was way faster than it was in version 3.3. Does it really extracts the text of the PDFs?

Regards,

Oberdan

The job UpdateSubmissionSearchJob run for each submission that is passed and delegate the actions to specific action handler which is for OJS is ArticleSearchIndex, thats all the jobs does . In OJS 3.3 we did not have queue jobs so I can not compare it but unless there is any error in error log, it should run properly .

Yeah, it worked and is running much faster now. Thank you very much.

Regards,

Oberdan