Mass configuration download and backup every night

Anyone ever tried to create a script or another way to save configuration of all devices on FTP or other locations at intervals?