Is there a way to run a groovy script or QuickBuild configuration automatically after a server restart?
- solved #2
- replies 1
- views 944
- stars 0
You may schedule a configuration to run periodically with below script:
groovy:
import com.pmease.quickbuild.bootstrap.Bootstrap;
def serverToken = vars.get("serverToken");
if (serverToken.value != Bootstrap.serverToken) {
logger.info("do something once after reboot");
serverToken.setValue(Bootstrap.serverToken);
}
Here variable serverToken should be defined in this configuration with an initial empty value. This works as Bootstrap.serverToken will be changed every time after server reboots