Hint: Starting with MacOS Monterey, the Shortcuts app is available on macOS. Unfortunately, supporting Shortcuts would require PDFScanner to stop working on anything before Catalina, which I currenty don't want to do. However, you can use the AppleScript commands to run OCR (and even deskew and black and white conversion) from a Shortcut. Here's an example: https://www.icloud.com/shortcuts/3e63f217c3174585b6aca8d45864a699
You can use the Automator action that is included with PDFScanner for performing batch OCR on a bunch of files or automatically have macOS perform OCR on all files in a folder.
To do this, you need to create a workflow in the Automator application that comes with macOS. When PDFScanner is installed, a "OCR with PDFScanner" action appears in Automator automatically.
Automator offeres different types of workflows. Select "Workflow" to create a simple workflow that is started directly from the Automator application or "Folder Action" to create a flow that is executed when a new file is added to a specified folder. On macOS Mojave, you can also create a "Quick Action" that will create a button in the finder to quickly perform the workflow.
To use PDFScanner ORC in a wokflow, just drag and drop it from the left side of the Automator window to the workflow panel on the right. If that does not work on Mojave, you first have to enable support for third party Automator Actions. Automator should open a confirmation prompt when double-clicking the PDFScanner action (dragging sometimes does not triggers this prompt).
The action will take PDF files as input and also provide PDF files as output. If you chose to save in place, the original files will be modified, otherwise the specified suffix will be appended. In general, you should chose to skip PDFs that already contain text, because there's no use in OCR'ing them (again).
Automator also provides a "New PDF from images" action to convert the images to PDF first. This way, you can create PDFs with text directly from an image in one step.
Explaining all the possibilities of Automator would be far beyond the scope of this article. You can find lots of information about Automator on the official Apple Homepage and on http://macosxautomation.com/automator/
If you need access to more advanced PDFScanner actions like deskew, you can also use AppleScript to automate PDFScanner.