How to script pre, and post tasks

Pre-Start Tasks

Tasks that need to be run BEFORE the application is started, should be started using the Cloudhouse.Container.Run.exe, with an entry in Programs.xml.

Post-Start Tasks

Tasks that need to be executed AFTER the application has been started, should be started after the application using the Cloudhouse.Container.Run.exe tool, with an entry in Programs.xml.

Post-Run Tasks

Commands that need to run AFTER the application has exited, should be specified with <Events>, <Exit> tags. 

Any number of PowerShell or Java scripts, executables,  batch files etc can be run using these tags.

  <Start>Usage.exe /start</Start>	
  <Exit>Usage.exe /end</Exit>	
  <Exit>PowerShell .\custom-script.ps1</Exit>	

All scripts, and exectuables are executed asynchronously, a process is spawned to perform the task, and execution proceeds immediately to the next exit tag.

Was this article helpful?

Can't find what you're looking for?

Contact Support