Jump to content

How can I kill a workflow/ Stop it from running once I've initiated it.


Recommended Posts

19 hours ago, deanishe said:

 

You need to use Activity Monitor or kill to terminate the process the workflow started.

 

Do you think they'd consider adding a workflow utility or something similar that would do this? It would have uses for many Alfred users I think. Or would it not be practical? 

 1069212796_ScreenShot2021-12-30at6_50_48PM.png.5c6b0017cb5f43dd629e14d9b49ddbe8.png

Link to comment
5 hours ago, deanishe said:

There is only one Alfred developer. There needs to be a pretty good reason for a feature for him to spend time implementing that instead of something else.

 

Yeah I understand, it's very very impressive what he's been able to do. It's like making YouTube videos, there's always more ideas than there is time & some ideas are better than others. It wouldn't hurt to put on the list, though.

 

Is there a way to easily tell what process is started by a workflow? Will it have a specific name? I'm only talking simple things here, like if I trigger something that opens a bunch of windows and I want it to stop for example.

Link to comment
6 hours ago, Undertaker01 said:

I assume the name of the process will be the name of the workflow that is running?

 

No, it will be the name of the binary that’s running. The name might be similar to the workflow's if it runs a binary (you'll see "alfred-firefox" for my Firefox workflow, for example), but most workflows are built with scripting languages, in which case you see the name of the interpreter (e.g. "bash", "Python", "zsh").

 

Normally, it's not possible to figure out which workflow a process belongs to without inspecting it to see which files are open.

Link to comment
On 12/31/2021 at 2:51 AM, Undertaker01 said:

It would have uses for many Alfred users I think.


In a decade of building Workflows and frequenting this forum, I don’t recall ever facing the need or seeing another request for that.

 

Most Workflow actions are fast enough you wouldn’t get to abort them in time anyway.

 

On 12/31/2021 at 2:51 AM, Undertaker01 said:

adding a workflow utility or something similar that would do this?


How would that work, even? You add a kill utility to a Workflow, and then what? You connect it to a Keyword or Hotkey and when those are invoked they kill everything in the Workflow? With which signal? Does it force a quit? What about if you have queued actions ready to trigger? Are those cancelled to?

 

You’re asking for a big internal change to support a minor feature which so far only one person would get occasional use out of. It seems unlikely to happen.

Link to comment

Ah - I use the kill button frequently in Keyboard Maestro when experimenting, building macros and especially when I mash my keyboard and trigger macros by accident.. Alfred's workflows are similar to that & I thought some users would like having the option incase they initiate a workflow they didn't intend to run.

Link to comment
  • 1 year later...
On 1/1/2022 at 3:08 PM, vitor said:

Most Workflow actions are fast enough you wouldn’t get to abort them in time anyway.

 

hello, @vitor

I have some workflows which include many delays with a resultant workflow lasting 15 minutes.

hello, just to help me better understand. If I quit Alfred, would all workflow automatically stop ?

thank you

Link to comment

The currently running script may still finish, but the objects wouldn’t continue.


One way to have a workflow stop is to have a File Conditional check for the existence of a certain file and stop the workflow—i.e. go another route—if it exists. Use the alternative route to also delete that file.


Then also have an action to create that file so it can be checked.


Shutdown Timer uses that technique. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...