I ended up setting up a cron job and got this working.