You should be able to do this all within your script, you can even have the datasource refresh within the script.
in a batch script run
tabcmd refreshextracts --datasource data --synchronous
then run your pdf script.
Schedule the batch job with windows task scheduler and you should be good to go.
Thank you Alex! That paved the way forward for us.