raguay.customct Posted April 3, 2013 Share Posted April 3, 2013 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 More sharing options...
jdfwarrior Posted April 3, 2013 Share Posted April 3, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now