Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Timed automation in IOS 14
-
IOS 14 permits timed automations (Shortcuts which run at a prescribed time) without user intervention for some actions. I tried to run a Pythonista action as part of a timed automation and got the rather strange message which said: "Automation failed. Shortcuts could not open Pythonista. It may not be installed on this device" However if I run the action manually, it works fine. Has anyone tried creating a timed automation and seen the same result?
-
@ihf, I experimented with this and launching both via URL and the Pythonista action. When invoked manually, all fine. Timed actions did not seem to anything, except ask to launch if I had that setting on.
I saw no error messages.
-
Oh well, I was hoping I could invoke a Pythonista script on a schedule without intervention but that does not seem possible.
-
I have tried the timed automation shortcut using Pythonista (TASUP) with mixed results.
I wrote the simplest possible script. Once it worked and several other times it didn’t work. Same script, different results — I have no insight as to why — I suspect it’s a timeout issue with the script and the response.
-
Edit attempt on September 20 2020 -- added link -- added bold font initials
Link to my PDF showing my Timed Automation Shortcut Using Pythonista (TASUP).
Page 4 in the PDF shows the failure notice.
As Mikael states, the manual use of my shortcut did work; the problem is with timed automation.
-
I have not checked the docs, but it would make sense that iOS would limit automations to a certain time between launch and response -- apple is always worried about battery life, it does not want you to be able to run long tasks in the background. Pythonista scripts take a long time to launch and run, so maybe it is timing out.
-
@JonB, I tried this with already-loaded Pythonista and an already-run script that just dropped a line to a file. When run manually, it was immediate to a human, so probaby not a timeout issue.
-
For me (or I'm really bad), automation without asking to tap on the notification does only work if I'm logged on my iPad, not if it is black. At least tested with "sending an email"
-
@cvp, I guess we did not even get that far yet, i.e. timed automations that would work in the background when the device is locked. All my experiments were with an unlocked/in-use phone.
-
@struct_engineer, I do not see a link. And sorry, what is ”TASUP”?
-
@mikael said:
timed automations that would work in the background when the device is locked.
I used successfully Pyto background module to send a remote notification to my iPhone while my iPad was locked but this stops to work after I did install iOS 14.
Thus I hoped I could replace that by Shortcuts automation. 😥
-
I've created a shortcut automation for
- at a defined time
- action = "run shortcut" which only contains an "open url Pythonista3:://script?action=run"
without asking before run
and it works (in unlocked mode)
-
@cvp, what does your Pythonista script do?
-
@mikael, see updated post.
-
@mikael nothing special, why? Any script is ok, it is not really started by an automation but by the shortcut
-
Just a guess but is it possible that Apple only permits some of its own actions to run as part of a timed automation with no user interaction from a locked state (and Pythonista is not one of those). Some of Apple's actions (e.g. Execute SSH) work fine but most others do not. I have tried with Scriptable, Pyto, and JSBox actions with no success.
-
@ihf possible and probable, but if action = Apple Shortcut and if this shortcut starts a Pythonista script, your objective is reached, isn't it?
Edit: sorry, I didn't read correctly the
from a locked state