pull down to refresh

Pick up a copy of @jimmysong 's Programming Bitcoin. It breaks down the math behind all the cryptography and encoding schemes.
Then you use something like electrum server to index your local copy of the Blockchain and parse all the UTXO scripts and check if any of them can be unlocked by the signatures derived from your list of private keys.
You only have to scan the whole chain once, then you check every new block.
Run your script with cron for every hour. Or set up some trigger that runs when a new block is added (that's your best bet if you want be the first to sweep it)