Run bash scripts in Sync Post-Job on Windows

Userlevel 1

It is possible to run .sh files via sysExecute in Sync Post-Jobs on a Windows installation of Sync, but you have to install a third party program such as bash or cygwin on your machine, which will allow the Windows OS to be able to run .sh files. For example, I have bash installed on my machine and below is how I can successfully call a .sh script using bash and sysExecute in Sync: 

<api:set attr="" value="C:\\Program Files\\Git\\bin\\bash.exe" /> 

<api:set attr="sys.arguments" value="C:\\Users\\Public\\Documents\\" /> 

<api:call op="sysExecute" in="sys" out="result"> 

  <api:set attr="" value="[result.sys:output]" /> 



Below is my simple .sh script that waits 5 seconds and then just echos "hello world": 

sleep 5  # Waits 5 seconds.  

echo "hello world" 

Which is then logged in the app log, after running the task: 




More details on sysExecute you can find in the following documentation:  


This topic has been closed for comments