Jump to content
Sign in to follow this  
raguay.customct

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...