Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to invoke a dispatcher script from AEM Author

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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. 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

@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. 

Avatar

Community Advisor

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



Arun Patidar

Avatar

Level 2

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).