You can use the ArcGIS Python API in regular python scripts outside of notebooks. You still set it up with the
from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "arcgis_python", "P@ssword123")
and then use that gis object to find all the hosted files and make backups in the manner that suits your
items = gis.content.search('Palm Springs Trails')
for item in items:
<get hosted layer id here with some legendary code>
gis.content.get('a0b157b9ce2440a39551967c7c789835')
and then set up the script in windows task manager or as a service.
I can search through some old code I have, but ESRI's examples are pretty good.
managing-your-content
and you can install the API through conda:
https://developers.arcgis.com/python/guide/install-and-set-up/