Jump to content

A way to specify workflows to run and start, stopping of Alfred


Recommended Posts

Hi,

 

It would be a great feature to be able to mark a workflow to be ran at starting, stopping Alfred. That way, we can write workflows to close out something started in a workflow. For instance, if I shutdown before logging my time off, it leaves my Alfred Time Keeper workflow mess up the data files. The best solution would be to auto log timing off up on shutdown.

 

Richard

Link to comment
Share on other sites

I don't know off the top of my head who made or manages Alfred Time Keeper but you could also suggest that they make it so that it's not constantly running a script to maintain the time. Make it generate and run a cron job using launchd scripts. 

 

In this case, the workflow would simply toggle a setting on/off and start or stop the launchd script. When it starts, it would toggle a value on, and save the time that it last ran. Every time the launchd script ran, it would check and see if the timer should still be running (the toggled value). If not, stop the script. If it is still toggled on, check and see when the last time was that the script ran. If it was more than 60 seconds ago, assume something happened, kill the script, toggle the value, and don't touch the time. If it has been 60 seconds, just increment the time keeper value and keep going.

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...