I've written some Applescript code that extracts emails from Outlook on my Mac. The Applescript is embedded in a Python program which processes the output of the Applescript.
It works perfectly when I run it manually. But I want it to run automatically, so I've scheduled it to run with cron -- and that's when it goes wrong.
Cron executes it, but Applescript can't send commands to my copy of Outlook (obviously because it's not logged in as me), so it times out with no results.
I suspect what I'm trying to do is impossible, and I need an alternative to cron. The easy answer would be to leave the Python code running in the background. It would stay dormant until a certain time, then to do its thing... but that doesn't feel like an elegant solution. Is there a better way? Thanks.
(As an example of some alternatives: How do I get a Cron like scheduler in Python?)