Is there a way to automate overwriting a hosted feature layer? I've seen samples for automating updating an msd but is a demo for updating a hosted feature layer?
Take a look at the following blog:
Updating your hosted feature service for 10.2 | ArcGIS Blog
Retrieving data ...