Thanks Dmitry,
There weren't any errors but the cause ended up being related to the storeId. In a form control this was being picked up from the SiteContext which isn't available in a ScheduledTask - so running an import was effectively changing the storeId of my documents when updating them and in turn was invalidating the indexes for those documents.
Adding a helper to get the storeId from the database solved this and everything is running fine now, indexes included.
Thanks for the code reference as it is still useful to be aware of.