Trouble with scheduled automation (iOS Shortcuts + OmniFocus)

I have an automation set up in Shortcuts. This automation runs every morning at 2am, and it executes an Omni Automation script that selects all tasks/projects with a certain tag (in this case, “tomorrow”) and removes that tag and adds a different tag (“today”).

I’m not having trouble with the script, it works great for my purposes. But the Shortcut only sometimes works. Most days I wake up and see a notification that the shortcut failed to run the script. Something like:

“Could not run Omni Automation script. There is no active window in the application …”

Any ideas on how best to address? Does anyone have any scheduled daily, weekly, or monthly scripts that they run? What’s the reliable way to do this–via Shortcuts or some other means?