Created
April 18, 2014 19:19
-
-
Save lifuzu/11060208 to your computer and use it in GitHub Desktop.
using groovy to invoke curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define cURL process with correct arguments. | |
def proc = "curl -o log/${day.format('yyyy-MM-dd')}.log " | |
+ "http://servername/import-data/${day.format('yyyy-MM-dd')}" | |
.execute() | |
// cURL uses error output stream for progress output. | |
Thread.start { System.err << proc.err } | |
// Wait until cURL process finished and continue with the loop. | |
proc.waitFor() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment