Cannot bootstrap Civi from standalone script in WP
Sorted. The problem was that the script was being run by the web server cron, rather than civi cron. As such the working directory was my home directory. Hacky fix is:

chdir(__DIR__);
eval(`cv php:boot`);


Better fix is to make it run via Civi cron.