Timed automation in IOS 14
struct_engineer last edited by struct_engineer
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.
JonB last edited by
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.
cvp last edited by
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”?
cvp last edited by
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?
struct_engineer last edited by
@mikael, see updated post.
@mikael nothing special, why? Any script is ok, it is not really started by an automation but by the shortcut
ihf last edited by
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