How to invoke a dispatcher script from AEM Author | Community
Skip to main content
June 7, 2021
Solved

How to invoke a dispatcher script from AEM Author

  • June 7, 2021
  • 3 replies
  • 1512 views

Hi Community,

 

  I am trying to invoke an sh script that's present in my dispatcher via AEM author. Is this achievable? Are there any customization guide or tools that I can follow to achieve this?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

@amrithanivas ,

You can try,
With an Apache Web Server, You can write a CGI script to intercept your web requests, next from the CGI script, you can call the .sh file. 

I don't think there are too many guides out there because this solution seems a bit out of the norm. 

3 replies

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
June 7, 2021

@amrithanivas ,

You can try,
With an Apache Web Server, You can write a CGI script to intercept your web requests, next from the CGI script, you can call the .sh file. 

I don't think there are too many guides out there because this solution seems a bit out of the norm. 

arunpatidar
Community Advisor
Community Advisor
June 7, 2021

hey, at which event you want to call that script? manually or on publish event?

Arun Patidar
mayank_saklech1
Level 2
June 7, 2021

I am assuming you have more than one dispatcher instances and that you will want to invoke shell script on all those dispatcher instances. One of ways is to write a shell script on your author server. That shell script will in turn ssh into all the dispatcher instances and execute the script, you may maintain list of dispatcher instances in that shell script. From AEM author instance, you will be left with invoking a shell script on same server which is an easier task.

Reason i mentioned involving one more script in between your author and dispatcher server is that you will not have to rely on 3rd party libraries for doing remote script execution (using ssh).