5

Add conflict option "queue"

I have a task that reads notifications as they come in.. it would be great if one of the conflict options was to queue up tasks, so if a notification comes in well it's reading out another it gets read after.

1 reply

I was having a similar idea, but for different purposes.

Please consider adding another Collision Handling mode for tasks in Tasker that would queue a new task to run after the existing task has finished?
 
Lets consider a task that is run by multiple profiles with different profile variables. This task might read a global variable into a local variable, execute a couple of commands and at the end save the result back into a global variable.
 
The issue is you can't abort neither the existing nor new task, because that would just ignore entire profiles being activated. And you can't run both together because only one of those task (the one that was run latest) would save it's results back into the global.
 
The idea is that the task could be called multiple times, like it is possible now, but instead of running those tasks at the same time, they would form a queue to be run one by one after the previous one has finished.
 
It's sort of like locking a file for file operations to make sure other apps don't write into the file at the same time.
 
 
The only workaround I can think of right now is rewriting everything into JavaScript so the entire script could be run as one action, which isn't ideal.