Sample: Scheduling readings export using task API
This sample shows a basic Readings Export request that is scheduled to run on the next available task runner. The ScheduleTask operation is marked in bold.
The parameters specify the destination directory and file name for the export file. The results document indicates whether the task was successfully scheduled.
Copy
<?xml version="1.0" encoding="utf-8"?>
<Task xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ScheduleTask Template="DefaultReadingXmlExport" ReturnType="String">
<Parameters>
<Parameter Name="StartDate" Value="2001-01-31T23:15:00Z" Index="0" />
<Parameter Name="EndDate" Value="2001-02-01T03:15:00Z" Index="0" />
<Parameter Name="NodeType" Value="ServicePoint" Index="0" />
<Parameter Name="EntityID" Value="02494" Index="0" />
<Parameter Name="NumberOfDecimals" Value="2" Index="0" />
<Parameter Name="TimeZoneID" Value="EasternUS" Index="0" />
<Parameter Name="ExternalSystemID" Value="MV90" Index="0" />
<Parameter Name="ExportDirectoryName" Value="c:\temp\exports" Index="0" />
<Parameter Name="ExportFileName" Value="DefaultParametersByID.xml" Index="0" />
<Parameter Name="OverwriteExistingFile" Value="Overwrite" Index="0" />
</Parameters>
</ScheduleTask>
</Task>