Jump to content

how to delay script execution?


Recommended Posts

Hi guys.

 

I'm new to this whole workflow thing. I'm trying to create a workflow that create new jekyll post. Currently it look like this:

13%205:42%20AM.png

 

- terminal command will build and watch jekyll directory.

- bash script will create markdown file bassed on user input and open the markdown editor.

- applescript will open new chrome tab to local server.

 

my question would be:

- is there a way to run jekyll watch via script instead of terminal command?

- is there a way to run applescript as an output. But delay for a few seconds?

 

Thank you.

 

 

Link to comment

Hi guys.

 

I'm new to this whole workflow thing. I'm trying to create a workflow that create new jekyll post. Currently it look like this:

13%205:42%20AM.png

 

- terminal command will build and watch jekyll directory.

- bash script will create markdown file bassed on user input and open the markdown editor.

- applescript will open new chrome tab to local server.

 

my question would be:

- is there a way to run jekyll watch via script instead of terminal command?

- is there a way to run applescript as an output. But delay for a few seconds?

 

Thank you.

 

I've never used Jekyll but most languages have a sleep/wait command. AppleScript uses "delay X" to delay the script for X seconds.

Link to comment

Also, look at the Egg Timer workflow that's somewhere on this forum. It can show you a script could give you updates.

 

If you have growl installed, then your bash script could just execute a command like 

growlnotify -n "My App" -m "Hello world"

randomly at intervals to keep you updated. At the end, the script can launch an applescript via the command line to open the tab via chrome.

 

--OR--

 

I'm not sure if you are looking to have the script progress open in a Chrome tab. If that's the case, then you'd just generate the initial report (via bash writing a markdown or html file), and, in the html file, use some javascript to set a refresh interval on the page. If you just have the bash script rewriting the html page (or markdown), then it should refresh on the interval.

 

I'm not sure that answers your question. If it doesn't, then could you tell me more about what Jekyll Watch does?

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...