Adjust periodic script to pass all prefixes at once