Minecraft wiki entry for Command_blocks_and_functions, associated text: The two hoppers form a redstone clock. You can use other clocks shown here.
The Command block 1 contains the /give command described in the section above. It can be dismissed if the player doesn't want the scroll to come back after being activated.
The Command block 2 contains the inventory check command: