简体   繁体   中英

How to start/stop a mule project dynamically on run-time?

I am new to mulesoft . I have a requirement to restart the project at a certain time everyday. Basically I need to write a cronJob/scheduler which will restart the mule project dynamically at run-time. Any help will be highly appreciated.

Which deployment environment you are using for eg CloudHub or standalone mule run-time server. If it is standalone mule server then you can write batch script for Windows or shell script for Linux to start, stop, or restart your mule application by using below commands.

mule start|stop|restart

Option 1. If your application is running in CloudHub , then you can use CloudHub API to start or stop your applications. Write a script to invoke following REST API endpoint, and run this script as per your requirement.

  • CloudHub API Documentation: Click Here
  • API To Use: POST /applications/{domain}/status

Option 2. If your application is running in Standalone Server , then you can write a script to start and stop your applications, and run this script as per your requirement. Click Here for detailed documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM