"Best" way to export data on a schedule

Thanks for all that. I’ll build and test it using a button in a custom form.

Now about executing it on a schedule.
In V8 I put the code in a DynamicQuery.ExportByID BPM. Then scheduled a BAQ Export Process.


Conditions:

the pcFilenameOverride argument contains the "APExport" value
and the pcQueryID argument is equal to the "MC-Trigger" value

But in E10, there is no DynamicQuery.ExportByID

What should I use to schedule it.

FWIW - the BAQ (“MC-Trigger”) that the BAQ Export Process ran, does nothing. just used to trigger the BPM.