I update a point layer on a SQL server enterprise geodatabase by scheduling a Truncate and Append job in ArcPro every night. The scheduled jobs are python scripts are Windows Task Scheduled jobs where the scripts are located in C:\Users\myuser\AppData\Local\ESRI\ArcGISPro\Geoprocessing\ScheduledTools.
This method has worked well until the point layer was connected to a published map in the WebApp. Now, every night, the Truncate tool runs, emptying the layer, but the Append returns an 0x1 error in Task Scheduler.
I'm having a hard time tracing the error, as the tool "runs" but doesn't actually append any records.
I'd also like to know if there's a more Esri approved method for pipelining data like this, updating from local geodatabase to Enterprise to ArcOnline/Web?