To avoid the ReactorNotRestartable error, you can try to create the main.py file, from where several times to call the scanner from the shell using subprocesses .
This main.py file could be like this:
from time import sleep import subprocess timeout = 60 while True: command = 'scrapy crawl yourSpiderName' subprocess.run(command, shell=True) sleep(timeout)
source share